The issue of Istihaalah is a process by which a substance undergoes complete transformation such that the new product is totally different from the original. This transformation is usually ignored by many people. We say if an impure substance transforms or changes in the process then it becomes pure. As a result, it is possible that the origin of something that comes from pig changes and becomes a different substance. For instance, a substance can originate from pig, but part of it could be taken and converted to something else to make soap.
The scholars gave examples of dung and anything like that, when it is burnt, its ashes is pure because it has become another thing. They also said if a dog entered and died inside a saltcellar and her body melted inside the saltcellar, such that her body can not be recovered. The dog has become part of the salt. This salt is pure and can be used for food or drink and anything.
The verdict is justified by the illah (underlying cause), whenever it disappears, then the law itself becomes invalid. Since the original substance is no longer existing then the ruling had got to change. For that reason, if the meat or bone of the pig has changed (transformed), then the ruling changes.
Dr. Muhammad Al Hawari, who is one of the medical doctors who lived in Germany for many years, has an excellent research on this matter. He confirmed that most of the substances that are used for making toothpaste, soap, and even gel, their origins are made from pig. But subsequently transformed to a new chemical compound, then attracted a different ruling.