Answer
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
It is prohibited for a Muslim to rear or farm pigs even if he intends to sell or trade in them with Christians or those who consume it.
Answering your question, Dr. Mohammad S. Alrahawan, Associate Professor at the department of Islamic Studies in English, Al-Azhar University, Egypt, states:
It is prohibited for a Muslim to rear or farm pigs even if he intends to sell or trade in them with Christians or those who consume it.
This is based on the report of Jabir ibn Abdullah who heard the Messenger of Allah (peace be upon him), in the year of the Conquest of Makkah, saying,
“Allah and His Messenger made illegal the trade of alcohol, dead animals, pigs and idols.” The people asked, “O Allah’s Messenger! What about the fat of dead animals, for it was used for greasing the boats and the hides; and people use it for lights?” He said, “No, it is illegal.” Allah’s Messenger further said, “May Allah curse the Jews, for Allah made the fat (of animals) illegal for them, yet they melted the fat and sold it and ate its price.” (Al-Bukhari)
Moreover, it is prohibited to help others in cooking, selling, buying or using pigs or any of its ingredients either for a Muslim or for a non-Muslim.
As for using or raising pigs to carry out lab experiments, scholars maintained that as long as one does not touch pigs except with a barrier, such as gloves, or one washes his hands after touching them, it is permissible.
Almighty Allah knows best.