Office of Grand Ayatollah Khamenei (may Allah grant him long life):
Generally speaking, snails, shellfish and crabs are haram (forbidden) to eat but shrimps and prawns are permissible, if they have been hunted and killed as per Shari'ah rules. Hence, if you are certain that those pills contain haram ingredients, it is not permissible to take them except when they are necessary for treatment in which case it is permissible to use them to the extent necessary.
Office of Grand Ayatollah Sistani (may Allah grant him long life):
If these ingredients existing in the pills are in very low quantity (2%), there would be no problem in taking them.
Office of Grand Ayatollah Makarem Shirazi (may Allah grant him long life):
There is no objection in using such medicines in the form of ointments but if they contain ingredients that have been extracted from haram animals (i.e. animals that are haram to eat), it is necessary to wash the body parts to make them pure before offering prayers.
Office of Grand Ayatollah Saafi Gulpaigani (may Allah grant him long life):
It is forbidden to use the said medicine but it is permissible to use the said animals' oil to apply on the body for healing joints and backache etc. A doctor also should not unnecessarily prescribe haram medicines. As for the effects of haram foodstuffs, there is no doubt that they affect the consumer's success and spiritual progress.