Yes Pork is allowed only in the most extreme circumstances and only if there is no other food available
The below verse confirms
Yusuf Ali chapter 16:115
He has only forbidden you dead meat, and blood, and the flesh of swine, and any (food) over which the name of other than Allah has been invoked.
But if one is forced by necessity, without wilful disobedience, nor transgressing due limits,- then Allah is Oft-Forgiving, Most Merciful.
As you can see that if you are forced by necessity and without willful disobedience . then Allah will forgive you for the consumption