If a Jew does a melacha on Shabbat there is a rabbinic prohibition to benefit from his actions. Some of the factors as to the ramifications of that prohibition are whether it was done intentionally, whether the violation of Shabbat was biblical, and for whom it was done. Also, if a non-Jew does a melacha there is a prohibition to benefit from his actions. That is discussed on the [[Amirah Lenochri]] page. Asking, encouraging, or aiding a Jew to do melacha is forbidden and the details are discussed on the [[Amirah Leyisrael]] page. There the idea of asking another Jew to do something which you are stringent not to do but others are lenient is addressed.
==A Non-Observant Jew==
# If a non-observant Jew does a melacha intentionally neither him or any other Jew may benefit from his actions on Shabbat. Others may benefit from it immediately after Shabbat but he may not benefit from it forever.<ref>Shulchan Aruch O.C. 318:1</ref> Even those for whom he did the melacha are considered like others for whom it is permitted after Shabbat.<Ref>Magen Avraham 318:2 initially extends the category of the one who did the melacha to include for whom he did the melacha for. The intention was for them to all directly benefit from the melacha, therefore, the penalty applies to them. However, <he notes that the Bet Yosef disagrees and holds that only for nullifying something prohibited are those for whom it was nullified considered like the transgressor himself, however, for Shabbat they are not because there's no concern he is going to continually violate Shabbat for others. Therefore, the Mishna Brurah 318:5, Kaf Hachayim on Shulchan Arukh, Orach Chayim 318:12, and Yalkut Yosef 318:6 all permit others to benefit from the violation of Shabbat right after Shabbat./ref>
# If a non-observant Jew violates Shabbat consistently every week there is a large dispute whether others may benefit from the melacha even after Shabbat. For example, if a Jewish restaurant is open every week the food is forbidden for everyone.<ref>Kaf Hachayim on Shulchan Arukh, Orach Chayim 318:12 cites the Ketav Sofer OC 50 who holds that only if someone violates Shabbat once do we say that it is permitted for others, however, if he does it every week then the product is forbidden for everyone even after Shabbat. Yalkut Yosef 318:6 is strict. Har Tzvi OC 180 seems to disagree with the Ketav Sofer.</ref>
# It is permitted to benefit from an action of a non-observant Jew on Shabbat if one doesn't get a direct benefit from the melacha.<ref>Shemirat Shabbat Kehilchata 1:34:7 introduction based on Shulchan Aruch O.C. 257:1</ref>