Reference: Fataawa Mu’aasarah – Page 77-78
Question: I want to marry a non-Muslim woman so I can gain permission to stay [in a country] and a passport. Is it permissible for me to get married for this intention only?
Response: If she is from among those to whom it is permissible to get married, then there is no harm in that as the Prophet ﷺ said:
«A woman is married for four [things]…»…and [therein] he mentioned wealth, and the authenticity [of this narration] is agreed upon [by both al-Bukhaaree and Muslim].
And this situation [as mentioned in the question] is like it (the hadeeth). So if he marries her so he can gain permission to stay [in a country], then there is no harm in that with the condition that he does not have the intention to divorce her once he gains permission to stay. And Allaah [alone] has the Complete knowledge [of all affairs].