India had always been an important trading center.Indias spices,silk etc were great demand in Europe.With the establishment of many new trade routes,The Portugeesw,British,Dutch etc came to India for trade.No trading wasn't the only motive.The flooding in of European traders like British, French, Portuguese and Dutch into India soon led to rivalries with traders constantly fighting against each other for supremacy.
 the things that attracted the European trading companies to settle down in india are
india is a very diversed country
it was very rich country
it had many resources
there was very good labour

yes trading was their only motive but later they started ruling