All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The opinion adopted at Islamweb is the view held by the majority of the contemporary scholars, namely that it is impermissible to buy shares in the companies that deal with Riba (interest) even if their main business activity is lawful. To the same effect, the resolution of the Fiqh Council affiliated with the Organization of Islamic Conference reads: "The basic principle is the prohibition of buying shares in the companies that occasionally deal with what is forbidden, such as Riba and the like, although their main activities are lawful.” [End of quote]
In the same vein, the resolution issued by the Fiqh Council of the Muslim World League, based in Makkah, reads, “It is impermissible for Muslims to buy the shares of companies and banks if some of their transactions involve Riba and the buyer is aware of that.” [End of quote]
The same opinion was adopted by the Permanent Committee for Scholarly Research and Fataawa in Saudi Arabia headed by Shaykh ‘Abdul-‘Azeez ibn Baaz ; the Sharee‘ah Board of the Kuwait Finance House (KFH); the Sharee‘ah Board of Dubai Islamic Bank (DIB); the Sharee‘ah Supervisory Board of the Sudanese Islamic Bank (SIB); and a number of contemporary jurists.
On the other hand, some other contemporary scholars and the Sharee‘ah supervisory bodies of some Islamic investment institutions held that it is permissible to buy such shares provided that the percentage of usurious interest obtained as part of the generated profits is disposed of. This opinion was held by the Sharee‘ah Supervisory Board of Al-Rajhi Investment Corporation, the Sharee‘ah Supervisory Board of the Jordan Islamic Bank (JIB), and Shaykh Ibn Manee'. The decision No. 485 issued by the Sharee‘ah Supervisory Board of Al-Rajhi Banking Corporation reads:
"- The permissibility of buying and selling the shares of those companies is restricted to need. If there are joint stock companies that committedly avoid dealing with Riba and meet such need, it is incumbent to settle for buying and selling their shares only and avoid other companies that deal with Riba.
- The total amount of the Riba-based loan, be it long-term or short-term, must not exceed 25% of the total assets of the company, noting that taking a Riba-based loan is forbidden regardless of its amount.
- The amount of revenue generated by an impermissible (non-Sharee‘ah-compliant) element must not exceed 5% of the total revenue of the company, whether this revenue is generated by a Riba-based investment, a prohibited activity, the ownership of unlawful assets, or otherwise.
If the nature (lawfulness) of some revenues is not disclosed, he must strive to know it and take into account the enjoined prudence in this regard.
- The total amount of the impermissible element, be it forbidden investment or ownership of an unlawful asset, must not exceed 15% of the total assets of the company.
The Board points out that the specified percentages stated in this decision are based on Ijtihaad (scholarly reasoning) and are subject to review whenever necessary.” [End of quote]
The Sharee‘ah Board of Dallah Al-Baraka Group differentiated between the prohibited activities in which the company engages, as follows:
"If the main activity of the company is lawful, but it deals with part of its capital in, for instance, wine trade, running gambling casinos, and the like of forbidden activities, it is impermissible to own, buy, or sell its shares.
However, if the company deposits its money in Riba-based banks and obtains interests or takes loans from Riba-based banks, regardless of the reason for borrowing, then in this case it is permissible to own its shares provided that the buyer calculates the percentage of Riba-based interest and disposes of it in charitable ways.”
Thus, it becomes clear to you that there is no scholarly consensus on this issue. However, it is recommended for a Muslim in this case to be on the safe side and avoid the scholarly difference of opinion by doing what is prudent, namely, avoiding the matters that scholars differed in regarding their impermissibility, and thus clearing his liability with certainty. This answers your question as to whether or not you should continue to purchase stocks in that company.
Allah Knows best.