Trade modules on ships are for building freighters which themselves are for establishing trade routes with other races see the trade tutorial from the main menu for more details.
To get a starbase trade module on a starbase you need to build a constructor ship which you will then deploy as an economic starbase, then with other constructors you add new starbase modules and among them since it's an economic starbase there should be the trade module, if you got the tech for it. Again I'll suggest viewing the tutorial video about starbases.
you may also refer to the galciv wiki for more details on trade & starbases : https://www.galciv.wikia.com