By Avner Friedmann
The Gemara relates the story of a Jew who greatly honored Shabbat and the reward that came to him because of it. His name was Yosef and because he so honored Shabbat, people called him, “Yosef who honors Shabbat”. Now, Yosef had a very wealthy gentile neighbor whose astrologers had told him, “All your possessions will ultimately belong to Yosef Who Honors Shabbat”. Fearing their prediction would materialize and hoping to avoid it, this neighbor sold all his possessions and bought a single precious pearl with the proceeds. He then had this pearl set in a hat which he always wore. Thus he hoped to guard against losing his wealth.
One Friday, as he was walking on the bridge to cross the river, a sudden gust of wind blew his hat off and sent it flying into the river. Thus all his wealth was suddenly and irretrievably lost, in one fell swoop. As it so happened, a huge carp was swimming nearby and swallowed the precious pearl. Later that afternoon the fishermen caught it, but by the time it was brought to market, the fishmongers were already closing their shops and refused to buy it. The fishermen asked them, “Do you know anyone who would be interested in buying this fish?” “Try Yosef” said the fishmongers, “He greatly honors Shabbat and though he is a poor man, he very well may buy your fish”.
The fishermen went to Yosef’s house and found him preparing for Shabbat. When he saw the splendid carp he bought it in honor of Shabbat and in preparing to cook it, he cut it open and found the precious pearl inside. That week, he sold it for a tremendous fortune and became a wealthy man for the rest of his life. Sometime after this incident, Eliyahu the prophet met Yosef in the guise of an old man, and told him, “Whoever spends in honor of Shabbat, the Shabbat repays him.”
We learn in Talmud that, “All of a person’s income is fixed each year between Rosh Hashanah and Yom Kippur, with the exception of his expenditures for the Shabbat and festivals and his expenditures for the Torah education of his children, in which case the more he spends, the more he receives”. This means that the amount a Jew spends in honor of Shabbat is not included in the total income decreed for him during the year and he is repaid for those expenditures above and beyond the annual allocation. However, he must pay out for these expenditures as they arise and only later is he reimbursed, as illustrated by our story. Rashi states that the amount of these reimbursements is not predetermined, but rather depends on what a person actually spends. Moreover, he is reimbursed in a time of need or thereafter. However, except for the expenditures of Shabbat, holidays and Torah education, a person should try to be frugal and careful of spending beyond his budget.
The Shulchan Aruch tells us that regarding these matters, a person does not need to be frugal. Our rabbis tell us that a person should honor the Shabbat and holidays and delight in them; and even if he does not have much, he should scrimp during the week to be able to have festive Shabbat meals, even if all he can afford is just “a little something special” designated for Shabbat. Whatever his expenditures are, he will be doubly reimbursed from heaven. This is because Shabbat is above nature and is beyond specific measure and so are its expenditures.
The Talmud tells us that the Holy One, blessed be He, says to Israel, “My children; borrow on My account and sanctify the holiness of the day. Trust in Me and I will repay you.” If a person does not have sufficient funds for his Shabbat or festivals expenditures, he should even borrow the funds and trust that HaShem will provide him with the ability to pay the loan. In spending in honor of Shabbat, a Jew should also have in mind to invite guests to his Shabbat table, especially the needy, as it is written: “He who is gracious with to poor has lent to Hashem, and He will pay him his reward.”
Not only do the Jewish people cease work and not earn money on Shabbat as other nations do, but in addition, they spend more than usual in honor that holy day. Nevertheless, they do not lack for anything because of Shabbat. On the contrary, Shabbat is the source of all the blessings of the other days. These blessings are triggered by our preparation for the Shabbat and honoring it. Our actions become vessels to contain the blessings of Shabbat. We see this from the experience of the Children of Israel in the wilderness. HaShem made manna descend from heaven, which they gathered every morning, but no matter how much they gathered, it was always exactly enough for that day. However, when they gathered their normal portion of manna on Friday, a miracle happened. When they arrived home to their tent, they realized that they actually had twice the amount, as the Torah states: “And it shall be that on the sixth day, when they prepare what they bring, it will be double what they gather every day”. 
Now, in the same manner as we are told to prepare before the onset of Shabbat, so are we also told to prepare for the world to come in this world. A person cooks his food and prepares his other needs before Shabbat, but once Shabbat commences, it is too late to do anything more, as our sages tell us: “Whoever toiled on Shabbat eve (Friday), will eat on Shabbat, but whoever did not toil on Shabbat eve, from what he will eat on Shabbat?” In the same manner, only a person, who labors in Torah and performs the mitzvot in this world, will reap their reward in the World to Come. This is because once the era of the World to Come commences, it will be too late to accomplish anything more.
 Shabbat 119a.
 Beitzah 16a.
 Based on Artscroll’s translations and comments.
 Beitzah 16a.
 שו”ע הרב הל’ שבת רמב:ג
 Beitzah 15b.
 Proverbs 19:17.
 Beshalach 16:5.
 Based on Pri Tzadik Maamar 3, and Tola’at Yaakov 13.
 Avoda Zara 3a, and Rashi there.