Lesson
Asking a Non-Jew: The "Shabbat Goy"
Asking a non-Jew to do melachah for you on Shabbat is generally forbidden by rabbinic law, with defined exceptions. The sages forbade asking a non-Jew to do on your behalf a melachah that you yourself may not do — because it would lead people to treat Shabbat lightly, and because "your agent is like yourself." This applies even if you.
About 3 min
The rule (amirah l'akum)
The sages forbade asking a non-Jew to do on your behalf a melachah that you yourself may not do — because it would lead people to treat Shabbat lightly, and because "your agent is like yourself." This applies even if you ask before Shabbat for the work to be done on Shabbat.
Exceptions (to be applied with a rabbi's guidance)
• For someone who is ill (even not in danger). • For a great need or significant loss, a rabbinic-level prohibition may be done by a non-Jew in some cases. • For a mitzvah need, in limited cases. • In very cold weather, a non-Jew may light a heater for the sake of the ill, children or everyone, since "all are considered ill with regard to cold."
What a non-Jew may do on his own
If a non-Jew does something for his own benefit (turns on a light to read), a Jew may benefit incidentally. Hinting indirectly ("It's dark in here") is a gray area treated by the poskim.
Further reading
Chabad.org has a dedicated article, "The Myth of the Shabbat Goy," explaining why this practice is far more limited than many people assume.
Chabad.org, "The Myth of the Shabbat Goy" (linked from Chabad.org's "Electricity on Shabbat")
Shulchan Aruch HaRav, Orach Chaim 243, 276, 307
