The Rama (Rav Moshe Isserles of Cracow, 1525-1572) ruled that if one needs to go on Shabbat to a dark place, he may ask a non-Jew to bring a candle that had already been lit and accompany him to that place. Although one may not ask a non-Jew on Shabbat to light a candle, and one may not derive benefit from the light of a candle lit by a non-Jew on Shabbat for a Jew, one may ask a non-Jew to bring a candle that had already been lit. Carrying a candle on Shabbat is forbidden only because of Mukseh, and Halacha permits asking a non-Jew to bring a Mukseh item on Shabbat, since there is a way for even a Jew to move a Mukseh item in a permissible fashion on Shabbat ("Tiltul Min Ha’sad" – moving indirectly). Therefore, as long as the candle had already been lit, one may ask a non-Jew to accompany him with a candle to a dark place on Shabbat.
The Mishna Berura (Rav Yisrael Meir Kagan of Radin, 1839-1933) adds that this is permissible even in the case of an oil lamp. It is forbidden for a Jew to carry an oil lamp on Shabbat not only because of Mukseh, but also because this will likely result in the oil shifting, causing the flame to increase or decrease, which would constitute a Shabbat violation. Nevertheless, the Mishna Berura writes, it is permissible to ask a non-Jew to bring a kindled oil lamp on Shabbat, since the non-Jew has no intention to tilt the lamp to increase or decrease the flame. Although this will inevitably happen, this does not warrant forbidding asking a non-Jew to bring the lamp.
A modern application of this Halacha is asking a non-Jew to bring a flashlight to a dark place on Shabbat. Although it is forbidden to ask a non-Jew to turn on a flashlight on Shabbat, it would be permissible to ask a non-Jew to bring a flashlight that is already turned on. In fact, according to some opinions, a flashlight is not considered Mukseh at all, and thus even though Halacha does not follow this view, Hacham David Yosef writes that it would certainly be permissible to ask a non-Jew to bring a lit flashlight to provide light on Shabbat.
Summary: Although one may not ask a non-Jew to turn on an electric light on Shabbat, one may ask a non-Jew on Shabbat to accompany him with a flashlight that had already been turned on, in order to provide light.