The Rambam · Sefer Zemanim
הלכות שבת ו׳Sabbath 6
Chapter 6 of 30 in Sabbath — 25 halachot
Halacha 1א׳
אָסוּר לוֹמַר לְנָכְרִי לַעֲשׂוֹת לָנוּ מְלָאכָה בְּשַׁבָּת אַף עַל פִּי שֶׁאֵינוֹ מְצֻוֶּה עַל הַשַּׁבָּת. וְאַף עַל פִּי שֶׁאָמַר לוֹ מִקֹּדֶם הַשַּׁבָּת. וְאַף עַל פִּי שֶׁאֵינוֹ צָרִיךְ לְאוֹתָהּ מְלָאכָה אֶלָּא לְאַחַר הַשַּׁבָּת. וְדָבָר זֶה אָסוּר מִדִּבְרֵי סוֹפְרִים כְּדֵי שֶׁלֹּא תִּהְיֶה שַׁבָּת קַלָּה בְּעֵינֵיהֶן וְיָבוֹאוּ לַעֲשׂוֹת בְּעַצְמָן:
It is forbidden to say to a gentile to do labor for us on Shabbat even though he was not commanded regarding Shabbat and even though he said to him [to do the labor] before Shabbat and even though there is no need for this labor other than [until] after Shabbat. And this matter is forbidden rabbinically (literally, from the words of the scribes) so that Shabbat will not be light in their eyes and they will come to do [forbidden work] themselves.
Halacha 2ב׳
נָכְרִי שֶׁעָשָׂה מְלָאכָה מֵעַצְמוֹ בְּשַׁבָּת אִם בִּשְׁבִיל יִשְׂרָאֵל עָשָׂה אוֹתָהּ אָסוּר לֵהָנוֹת בְּאוֹתָהּ מְלָאכָה עַד מוֹצָאֵי שַׁבָּת וְיַמְתִּין בִּכְדֵי שֶׁתֵּעָשֶׂה. וְהוּא שֶׁלֹּא יְהֵא הַדָּבָר בְּפַרְהֶסְיָא עַד שֶׁיֵּדְעוּ בּוֹ רַבִּים שֶׁדָּבָר זֶה בִּשְׁבִיל פְּלוֹנִי הוּא נַעֲשָׂה בְּשַׁבָּת. וְאִם בִּשְׁבִיל עַצְמוֹ בִּלְבַד עָשָׂה מֻתָּר לֵהָנוֹת בָּהּ בְּשַׁבָּת:
[In the case of] a gentile who did forbidden work on his own on Shabbat: If he did it for the sake of a Jew, it is forbidden to benefit from that work until the conclusion of Shabbat; and he waits [the time it would take] in order to make it. And that is when the thing is not in public to the point that many know that this thing was done on Shabbat for the sake of x. But if he did it for himself alone, it is permissible to benefit from it on Shabbat.
Halacha 3ג׳
כֵּיצַד. נָכְרִי שֶׁהִדְלִיק אֶת הַנֵּר מִשְׁתַּמֵּשׁ לְאוֹרוֹ יִשְׂרָאֵל וְאִם בִּשְׁבִיל יִשְׂרָאֵל אָסוּר. עָשָׂה נָכְרִי כֶּבֶשׁ לֵירֵד בּוֹ מִן הַסְּפִינָה יֵרֵד אַחֲרָיו יִשְׂרָאֵל וְאִם בִּשְׁבִיל יִשְׂרָאֵל אָסוּר. מִלֵּא מַיִם לְהַשְׁקוֹת בְּהֶמְתּוֹ מַשְׁקֶה אַחֲרָיו יִשְׂרָאֵל וְאִם בִּשְׁבִיל יִשְׂרָאֵל אָסוּר. לִקֵּט עֲשָׂבִים לְהַאֲכִיל לִבְהֶמְתּוֹ מַנִּיחַ יִשְׂרָאֵל בְּהֶמְתּוֹ לֶאֱכל מֵהֶן. וְהוּא שֶׁלֹּא יְהֵא אוֹתוֹ הַנָּכְרִי מַכִּיר לְאוֹתוֹ יִשְׂרָאֵל שֶׁמָּא יַרְבֶּה בִּמְלַאכְתּוֹ בִּשְׁבִילוֹ וְנִמְצָא עוֹשֶׂה בִּשְׁבִיל יִשְׂרָאֵל. וְכֵן כָּל דָּבָר שֶׁאֶפְשָׁר לְהַרְבּוֹת בּוֹ לֹא יֵהָנֶה בּוֹ בְּשַׁבָּת אֶלָּא אִם כֵּן אֵינוֹ מַכִּירוֹ:
How is this? A Jew is permitted to use the light that was lit by a gentile. But if it was for the sake of a Jew, it is forbidden. [If] a gentile made a ramp upon which to descend from a ship, the Jew can descend after him. But if it was for the sake of a Jew, it is forbidden. [If] he filled water to give drink to his animal, the Jews can give [his animal] to drink after him. But if it was for the sake of a Jew, it is forbidden. [If] he plucked grasses to feed his animal, the Jews may place his animal [adjacent] so he can eat from them. And that is when that gentile does not know that Jew – lest he increase his work for his sake; and it come out that he did it for the Jew. Likewise [with] anything which he can increase, [the Jew] can only benefit from it on Shabbat if he does not know him.
Mishneh Torah, Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Edition, tr. R. Francis Nataf, 2019 — CC BY