There is a common misconception in the Halachot of Shabbat that any Melacha done by a non-Jew for a Jew is permitted. Unfortunately people don’t ask about this. They assume that once a non-Jew is involved, automatically there is no problem. This is not true. In general, it is prohibited for a Jew to benefit from a Melacha done by a non-Jew for his benefit.
The Shulhan Aruch (276:1) brings a case which illustrates this point. If a Jew is sitting in a dark room, unable to read, and a non-Jew sees the situation and turns on the lights for the Jew, it is forbidden for the Jew to have benefit from that light. Even if he did not request, or even hint that he desired light, the Halacha says that he must abstain from using that light for the remainder of Shabbat. While he does not have to leave the room, he may not perform activities, such as reading, which could not have been accomplished before the lights were turned on.
Moreover, even if another Jew subsequently enters the room, he also is prohibited from receiving benefit from the light. The fact that the non-Jew did the action for a Jew, prevents all Jews from benefitting.
These cases are common occurrences, especially in homes with a non-Jewish housekeeper. It goes without saying that a Jew may not instruct or hint to the non-Jew to turn on the light.
A Jew may not benefit from a Melacha performed by a non-Jew on his behalf.