According to biblical law, it is permitted to prepare on a holiday day for a Shabbat that immediately follows, provided that the preparations are concluded leaving ample time before Shabbat enters—enough time to allow for the prepared food to be eaten before Friday's sunset.1

Nevertheless, the sages prohibited food preparation on a yom tov (holiday) Friday day for the sake of Shabbat, unless an eruv tavshilin is set aside before the onset of the holiday. An eruv tavshilin consists of a cooked food (minimum one ounce) and bread or matzah (minimum two ounces, and preferably a complete loaf or matzah).2 These two food items are prepared and set aside for Shabbat before the holiday, symbolically serving as the beginning of the preparation of food for Shabbat. Thus, any subsequent cooking done on yom tov is considered to be a continuation and completion of the preparation begun beforehand.3

There are two reasons for this rabbinic institution:

a) Concern for the honor of yom tov: This injunction impresses on people the importance of yom tov. After all, it is forbidden to prepare on yom tov even for the sake of the holy Shabbat. How much more so is it forbidden to prepare on yom tov for a following weekday!

b) Concern for the honor of Shabbat: When Shabbat follows yom tov, there is the concern that one's attention will be focused on yom tov, which arrives first, and pay less attention to the Shabbat that follows. The eruv tavshilin compels the person to begin preparation for Shabbat even before yom tov begins, thus reminding him to reserve choice dishes for Shabbat, too.

What if I forgot to set aside an eruv tavshilin?

Strictly speaking, if one forgot to set aside an eruv tavshilin, he is not permitted to prepare anything on yom tov for Shabbat. Luckily, however, there is some leeway.

When a person sets aside his own eruv tavshilin, he is allowed to stipulate that this eruv is also on behalf of all the Jews who live in the vicinity, so that they too will be permitted to cook on yom tov for use on Shabbat—even if they did not set aside their own eruv tavshilin.

And in fact, it is common practice for the rabbi of every community4 to do just that—to include all the Jewish members of the neighborhood in his personal eruv.5

This, however, does not absolve the city's inhabitants from making their own eruvs. This is a loophole to be employed only by individuals who due to their preoccupation on the day before yom tov had forgotten to make their own eruv6—not for people who were negligent or purposely did not set aside their own.

If one forgot to set aside an eruv before a two-day holiday that falls on Thursday and Friday, an eruv can still be set aside on Thursday—though the procedure is different. Consult with your rabbi if you find yourself in this situation.