In some of the foods the artificial flavoring is used and that may include pork flavor too. Now the question arises if this is halal or haram as the pork itself is prohibited in Islam.
It must be understood that if the flavoring is made from any part of the pig then without any doubt it is haram because Allaah says (interpretation of the meaning):
“Say (O Muhammad صلى الله عليه وسلم): “I find not in that which has been revealed to me anything is forbidden to be eaten by one who wishes to eat it, unless it be Maytah (a dead animal) or blood poured forth (by slaughtering or the like), or the flesh of swine (pork); for that surely, is impure”
Allaah has forbidden pork because it is impure and unclean.
But if it is manufactured artificially and is not made from pork, then it is at least makrooh, because it is an imitation of something that Allaah has forbidden. What the believer should do is keep away from haraam things and shun them, and not enjoy them or look for foods that are similar to them.
Moreover, that may be a means of getting used to the taste of pork, which would make it easier to eat it later on. it is the duty of a Muslim to be careful of what he eats and what he likes. He may become too addicted to the artificial flavor that he may even consider consuming the forbidden food as well. Better to be on the safe side than falling in the sin.
And Allaah knows best.