4 A Jew is able to give to a heathen money to do business with it, and even though the heathen does business with it on Shabbat, he splits with him all the profit equally since the Jew is not obligated to do this work that we should say that the heathen is doing it as his agent, and also the work isn't recognizable, from whom it is. Gloss: And this is specifically in such a case where the heathen does work by himself with the money. But if each one works on his day and the Jew needs to work corresponding to what the heathen did on Shabbat, it's prohibited [Beit Yosef in the name of a gaon]. And a Jew that has collateral from the heathen – see below, siman 325, seif 2 and 3.
5 It is permissible for a Jew to give merchandise to a heathen to sell if he set his wages. But only as long as he won't say to him: "sell on Shabbat". An oven that was taken by a Jew as collateral from a heathen and the heathen took upon himself that he will give the profits of the oven to the Jew with the interest of his money: it is permissible to take the profit of Shabbat because it is in the property of the heathen and the Jew has no part in it, and also, the Jew isn't saying to him to work on Shabbat, and the heathen is laboring for the sake of himself, to fulfill his stipulation.
6 If heathens baked in an oven of a Jew on Shabbat against his will and they gave him bread as rent of the oven, it is forbidden to benefit from it.
246: Laws of Lending and Renting and to a Heathen on Shabbat.
1 It's permissible to lend and to rent tools to a heathen, and even though he does work with them on Shabbat, because we're not commanded on the resting of vessels. And some say that tools that work is done with them, such as a plow, etc., it is forbidden to rent to a heathen on Shabbat Eve. And on the 5th day it is permissible to rent to him, and only as long as he won't take Shabbat rent, rather it is subsumed by the rest. For example, that he should rent to him for a month or a week. And to lend to him is permissible even on Shabbat Eve. Gloss: And so is the main opinion like the last reasoning. And it's permissible to lend to him on Shabbat Eve (Tur; and Sma"g; and Sma"k; and Tosefos, first chapter of Shabbat) even though he stipulates that the heathen will return and lend to him, we don't say in such a case that it's like renting. (Hagahos Maimoni, Chapter 7).
2
It is forbidden to lend any tool to a heathen on Shabbat, and even on Shabbat Eve if it's so close to dark, that there is no time to take it out from the opening of the lender's house before dark, because one who sees thinks that the Jew commanded him to take it out.