May one enter a non-Kosher restaurant?
In general, it is forbidden to enter into a non-Kosher restaurant due to Maras Ayin even if there are no Jews in the vicinity. However, in a time of great need [such as one is very hungry or needs the bathroom] and there is no active Maras Ayin involved in one’s eating in the restaurant [such as there are no Jews in the vicinity who will see him eating there], then it is permitted to eat within the restaurant, preferably in a secluded area. If, however, there are Jews around who will see him eating there, then it is forbidden to do so even in a time of great need, unless he informs them of the situation.
 Igros Moshe O.C. 2:40; See Toras Chatas 17:4, brought in Taz 91:2, that in a time of need one may eat Kosher foods in the home of a gentile using his non-Kosher vessels, however, perhaps there he refers to a private home and it is hence not relevant to the discussion of a public restaurant.
Background and other approaches: The Poskim [prior to Igros Moshe] do not make any mention of a prohibition of Maras Ayin involved in eating in a non-Kosher restaurant. The Rama in Toras Chatas ibid who discusses eating in a gentile’s home also does make any mention of it [although perhaps he refers to a private home and not a public hotel or restaurant]. Now, whether or not we are allowed to create new decrees of Maras Ayin that are not recorded in the Talmud, it is evident from various rulings that one may do so [see Rama 87:3-4 and Shach 87:6 based on Rashba; Peri Toar 87:9]. However, some Poskim rule that one may not create new decrees of Maras Ayin that are not based on the Talmud or Rishonim, as if we were allowed to do so, there would be no end to the suspicions. [Peri Chadash 87:7; See Yechaveh Daas 4:50] Vetzaruch Iyun on Igros Moshe ibid who makes no mention of any of these matters.
 The reason and source: It is forbidden to enter a non-Kosher restaurant to do both Maras Ayin [that people will think it is permitted to eat there] and Chashad [that people will suspect that one is eating non-Kosher]. [Igros Moshe ibid based on Avoda Zara 11a and Michaber Y.D. 149 regarding the prohibition to travel on a road that leads to a city of idolatry due to Chashad that people will think one is coming to serve idolatry, and the same applies whenever one enters an area of prohibition, such as a non-Kosher restaurant; This follows the Poskim ibid who rule that one may make new decrees of Maras Ayin that are not recorded in Poskim] The prohibition of Maras Ayin by a Biblical Issur applies even in private. [See Admur 301:56; 305:14; M”A 301:56; Taz 301:28; Rosh 23:8; Tosafus Kesubos 60a; M”B 301:165]
 The reason: As in a case of loss and pain the sages did not make their decree of Maras Ayin. [Igros Moshe ibid, based on Kesubos 60a that the Sages allowed one who is in pain to suckle milk from a cows udder on Shabbos and did not suspect for Maras Ayin]