If the medicine is purely herbal and contains nothing from animals that have been slaughtered in the name of anything other than Allah, and does not contain anything impure and prohibited, such as alcohol or pork products, then what we think is that there is nothing wrong with you taking it and seeking healing by means of it, if it is proven to be efficacious from a medical point of view, even if it is made by Hindus who mention the names of their gods over it. That is for the following reasons:
The basic principle is that beneficial herbs and plants are permissible. Allah may He be glorified and exalted, caused them to grow in the interests of humanity and for their benefit, and bestowed this blessing upon His slaves. Allah, may He be glorified and exalted, says (interpretation of the meaning):
“He it is Who sends down water (rain) from the sky; from it you drink and from it (grows) the vegetation on which you send your cattle to pasture;
With it He causes to grow for you the crops, the olives, the date-palms, the grapes, and every kind of fruit. Verily! In this is indeed an evident proof and a manifest sign for people who give thought”
This implies that this basic principle of permissibility remains in effect unless there is sound shar‘i evidence to the contrary. Because we do not find any factor which would imply that it is prohibited, such as if it were mixed with impure or prohibited substances, there is no proof that it is disallowed. The original ruling remains as it is.
There is nothing in the Qur’an or Sunnah to indicate that mentioning the name of other gods over food makes it prohibited. Because there is no such evidence, the basic principle that it is permissible remains in effect.
With regard to the verse in which Allah, may He be glorified and exalted, says (interpretation of the meaning): “He has forbidden you only the Maytatah (dead animals), and blood, and the flesh of swine, and that which is slaughtered as a sacrifice for others than Allah (or has been slaughtered for idols, etc., on which Allah’s Name has not been mentioned while slaughtering). But if one is forced by necessity without wilful disobedience nor transgressing due limits, then there is no sin on him. Truly, Allah is Oft-Forgiving, Most Merciful” [al-Baqarah 2:173], what is meant by “that which is slaughtered as a sacrifice for others than Allah (on which Allah’s Name has not been mentioned while slaughtering)” refers to meat, not all kinds of food. Meat from animals that have been slaughtered as a sacrifice for anyone other than Allah, may He be glorified and exalted, and over which the name of any object of worship other than Allah, may He be exalted, was mentioned, is what is forbidden according to the Qur’an and Sunnah, and the opinions of the fuqaha’.
Land animals are not to be eaten when alive; rather whatever is cut from them when they are alive is maytah (“dead meat” - that which was not slaughted in the prescribed manner). Therefore the intention is essential at the time of slaughter. If the intention or raising of the voice was for any object of worship other than Allah, may He be exalted, then the meat is tainted with the stain of shirk (polytheism) or bid‘ah (innovation), and the ruling that it is haram (prohibited) remains in effect.
With regard to other types of food, such as that of plant origin, it remains as it is, permissible in principle. Therefore the mention of any name other than that of Allah over it is of no significance and the fact that it was cultivated or made for the sake of Allah, the true God, or for the sake of any false god, does not have any impact on whether it is permissible or prohibited. Therefore it is permissible to eat the food of the mushrikeen (polytheists) apart from meat, unless there is some other reason for which it should be regarded as haram, as stated above.
Imam al-Qurtubi (may Allah have mercy on him) said:
… i.e., anything over which the name of anyone other than Allah, may He be exalted, has been mentioned and is slaughtered by a Magian (Zoroastrian), idol-worshipper or one who denies the attributes of Allah. The idol-worshipper sacrifices it to the idol, the Magian sacrifices it to fire, and the one who denies the divine attributes does not believe in anything, so he slaughters it for himself. Ibn ‘Abbaas and others said: What is meant is that which is sacrificed to stones and idols.
The custom of the Arabs was to call out the name of that for which the sacrifice was intended. This practice was so prevalent that it was taken as describing the intention, which is the reason for the prohibition of the meat.
End quote from al-Jaami‘ li Ahkaam al-Qur’an (2/223).
Moreover, their gods are false and worthless, and there is no ruling for that which is worthless, and it is of no significance and has no impact on the truth, which is the principle that it is permissible, by Allah’s leave. The haraam action that the mushrikoon do does not make haraam that which is permissible for people.
Some reports and scholarly opinions say that it is permissible to eat the food of non-Muslims and people other than the people of the Book, with regard to that which is not slaughtered (i.e., food other than that of animal origin), and they did not differentiate between that which is made on their festivals or over which their incantations are recited, and that which was not subjected to that.
Ibn Abi Shaybah narrated in al-Musannaf (5/126) from ‘Aa’ishah that a woman asked her: We have neighbours who are Magians, and they have a festival on which they give us gifts. She said: As for that which is slaughtered for that occasion, do not eat it, but eat from their produce (fruits, vegetables, etc).
There is some weakness in its isnaad because of Qaboos ibn Abi Zubyaan. He was classed as da‘eef by Abu Haatim, Ibn Ma‘een and an-Nasaa’i, as it says in Tahdheeb at-Tahdheeb (8/306).
Ibn Abi Shaybah also narrated with his isnaad in al-Musannaf (5/126) from Abu Barzah that he had tenants who were Magians, and they used to give him gifts on the occasion of Nawruz (Persian New Year) and other festivals. He used to say to his family: Whatever grew on trees, eat it, and whatever is not like that, reject it.
These people and others regarded it as permissible to eat the food of the Magians on their festivals, and usually the food eaten on festivals has some religious significance in most religions, yet despite that they ruled that it was permissible.
The fuqaha’ also regarded it as permissible to take medicine made by non-Muslims, if it is free of harmful effects and impurities; the fuqaha’ did not stipulate that the Muslim should ascertain that it is free of their incantations and so on.
Ibn Muflih (may Allah have mercy on him) said:
Chapter on seeking medical treatment from non-Muslims… It is makrooh for a Muslim to seek medical treatment from a dhimmi (non-Muslim living under Muslim rule) in non-essential cases or to take medicine from him when it is not clear whether its ingredients are permissible. The same applies to medicines that he prescribes or makes. This was mentioned in ar-Ri aayah and elsewhere.
End quote from al-Adaab ash-Shar‘iyyah (2/441)
This implies that if the ingredients are known, or it is known that it is permissible, and the sick person needs that medicine, then doing these things is not makrooh.
All that is required of you with regard to the issue you mention of pronouncing of names other than the name of Allah is that you should avoid it yourself, and mention the name of Allah, may He be exalted, over your food and drink, and also over your medicine. If the name of any of these false gods is written on the container, then you should blot it out or discard the container, if this medicine does not need to be kept in it. Then after that there will be no blame on you for consuming the medicine that you mentioned in the question, but that is subject to three important conditions:
1.That it is established that it is free of haraam or impure substances.
2.That you should also confirm that it is indeed efficacious and beneficial; do not be deceived by rumours and people’s talk without clear evidence of its positive effect, otherwise this is a means that may lead to trickery and consuming people’s wealth unlawfully, or it may be a means of causing harm to people and using them for experimental purposes.
3.That you should actually need the medicine to treat a sickness or alleviate its harmful effects.
And Allah knows best.