The Halachic authorities addressed the question as to the permissibility of staying in a hotel on Shabbat. When one stays in a hotel on Shabbat, he pays for services rendered specifically on Shabbat, which would seemingly violate the prohibition of Sechar Shabbat (receiving payment for work done on Shabbat).
Rav Shelomo Kluger (Poland-Galicia, 1783-1869), in his work Ha’elef Lecha Shelomo (Orah Haim 125), addressed this question and writes that in truth, when one rents a hotel room for Shabbat he also uses it before and after Shabbat. Hotel guests who come for Shabbat generally check in on Friday afternoon and leave sometime on Mosa’eh Shabbat, well after the conclusion of Shabbat. Therefore, the payment for the hotel room is also for services provided before and after Shabbat. The Halachic principle of "Habla’a" allows one to receive payment for work that includes work done on Shabbat, as long as it also includes work done at other times. Therefore, it is permissible to pay for a hotel room for Shabbat, since the payment is also for use of the hotel room on Friday afternoon and Saturday night.
Hacham Bension Abba Shaul (Israel, 1923-1998) notes, however, that this solution would not be effective in a case where Yom Tob falls on Friday and Sunday, and one spends both days in the hotel.