It is permissible to use limbs/organs/parts of those animals which are permissible for Muslims to consume for an organ trans-plant to the human body, when there is fear of losing life or there is a fear of losing a limb or organ and that the replacement can only be found in animals.
With respect to using a part of the pig, this is generally disallowed and prohibited. However, if there is a risk of losing one’s life, and nothing else is available, then it will be permissible to use this to the extent of necessity.
And Allah Knows best
Mufti Waseem Khan