Free trade between industrially advanced countries can be of mutual benefit, but free trade between rich and poor countries, which happens frequently, is disastrous for the least developed trade partner. Therefore, countries attempting to build up their industrial capacity will have to protect their infant industries through tariffs and other import restrictions. Once industries have been developed sufficiently enough to compete, they can gradually be exposed to trade through local trading blocks that can expand geographically over time. It is best if developing nations only export finished or semi-finished goods and not just raw materials, as is very common today.
If a country has vast resources of raw materials, such as oil, then export may be mutually beneficial, but oil exporting countries need to use the profits to diversify their own local industries as well. Barter of raw materials can be a great way for developing nations to ensure sufficiency in food and other basic needs. The main goal for both developing and developed nations is to first create a self-sufficient industrial and agricultural economy as far as possible before engaging in large scale trade.