If someone who is machalel Shabbos pours wine into a glass to drink from, what’s the din on the wine left in the bottle?
The wine remaining in the bottle is permitted.
Even when a non-Jew pours from a bottle of wine, there is a halachic question over the remaining contents of the bottle.
According to Rav Sheshes, as cited in Avodah Zarah 72b, it is clear that the wine remaining in the bottle does not become prohibited, even when a non-Jew pours the wine (from a Jew’s bottle of wine). According to Rashi and Tosafos, this is also the halachah.
However, the Raavad and the Rashba, as cited by the Kessef Mishnah (Maachalos Asurus 12:2) rule that the remainder of the bottle becomes forbidden, because of the connection made by the flow of wine.
The Shulchan Aruch (Yoreh De’ah 125:1) rules stringently, but rules leniently elsewhere (124:13; 126:5), and the Rema (125:1) is also lenient. The contradiction is noted by the Shach (125:1), who writes that one can be lenient in cases of loss, in particular because the non-Jews today are not idolaters.
Concerning Muslims, whose touch does not forbid in benefit and only in drinking, there is no concern for the wine remaining in the bottle (Shulchan Aruch 126:5).
Certainly, one can rely on the ruling of the Shach for non-religious Jews.
See also Yabia Omer, Vol. 1, Yoreh De’ah 11.