Praise be to Allah.
The pig is impure (najis) and its skin cannot purified by tanning, according to the correct scholarly opinion. Please see the answer to questions no. 1695 and 143663.
Based on that, it is not permissible to wear anything made of pig skin whilst praying, because one of the conditions of prayer is that one’s clothes should be clean and pure, and should not carry any impurity. It is also not permissible to buy or sell such items, because this is property that has no value in Islamic law. For more information, please see the answer to question no. 147632; this applies whether it is shoes, a coat or a belt.
If a person prays wearing a coat or shoes… made from pig skin or any other type of skin that is impure and cannot be purified by tanning, his prayer is not valid, unless he is unaware of the ruling or forgot, in which case his prayer is valid and he is not to be instructed to repeat it, according to the more correct scholarly view.
With regard to wearing these shoes outside of prayer, that is permissible in the case of need. Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
Treating illness by eating lard (pig fat) is not permissible; with regard to treating illness by applying it to the skin then washing it off after that, that comes under the heading of the permissibility of direct contact with impure substances outside of prayer, concerning which there is a well-known difference of scholarly opinion. The correct view is that it is permissible in cases of need; if something becomes permissible in cases of need, then it is permissible to treat illness with it.
End quote from Majmoo‘ al-Fataawa, 24/270
But in that case it is essential to take precautions so that furniture and carpets are not contaminated with impurity. It is well known that impurity is only transferred when there is wetness or dampness on the shoes and in the carpets and so on, and the shoes come into contact with it.
See also question no. 22713
And Allah knows best.