There are records throughout history of India's trade with foreign countries.
Even before independence, the Government of India maintained semi-autonomous diplomatic relations. It had colonies (such as the Aden Settlement), who sent and received full missions, and was a founder member of both the League of Nations and the United Nations. After India gained independence from the United Kingdom in 1947, it soon joined the Commonwealth of Nations and strongly supported independence movements in other colonies, like the Indonesian National Revolution. The partition and various territorial disputes, particularly that over Kashmir, would strain its relations with Pakistan for years to come. During the Cold War, India adopted a foreign policy of not aligning itself with any major power bloc. However, India developed close ties with the Soviet Union and received extensive military support from it.
The Periplus of the Erythraean Sea is a document written by an anonymous sailor from Alexandria about 100CE describing trade between countries, including India.
In 1498 Portuguese explorer Vasco da Gama landed in Calicut (modern day Kozhikode in Kerala) as the first European to ever sail to India. The tremendous profit made during this trip made the Portuguese eager for more trade with India and attracted other European navigators and tradesmen.
Pedro Álvares Cabral left for India in 1500 and established Portuguese trading posts at Calicut and Cochin (modern day Kochi), returning to Portugal in 1501 with pepper, ginger, cinnamon, cardamom, nutmeg, mace, and cloves. The profits made from this trip were huge.
1991 economic reform
Prior to the 1991 economic liberalisation,India was a closed economy due to the average tariffs exceeding 200 percent and the extensive quantitative restrictions on imports. Foreign investment was strictly restricted to only allow Indian ownership of businesses. Since the liberalisation, India's economy has improved mainly due to increased foreign trade.