I. The Eruv Tavshilin
Preparation for a Shabbos that comes immediately after a Yom Tov is technically permitted, although the reason for that permission is debated (Pesachim 46b). According to one opinion, it is because Shabbos needs are inherently considered a Yom Tov need. According to another, preparation for Shabbos is incidentally permissible because there is a small chance that the preparations will be used on Yom Tov if guests come. Either way, you are biblically allowed to cook or otherwise prepare on Yom Tov for the coming Shabbos.
However, because this might lead to people mistakenly preparing on Yom Tov for weekdays, the rabbis forbade preparation from Yom Tov to Shabbos unless a statement is made to raise awareness that it is an exception (Pesachim 46b; Beitzah 16b). This statement is the eruv tavshilin. You must explicitly begin preparations for Shabbos before Yom Tov with two cooked foods and the recitation of a formula.
If you forget to make an eruv tavshilin, you remain subject to the rabbinic prohibition and may not prepare on Yom Tov for Shabbos. Unless, that is, you utilize two additional options. The first is making a conditional eruv tavshilin. The concept underlying the observance of two days of Yom Tov in the Diaspora is that originally Jews outside of Israel were unsure which of the two days was Yom Tov. If the previous month had 29 days, the first day was holy and if the month had 30 days, the second. Since there was a doubt whether either day was Yom Tov, you could make an eruv tavshilin on the first day of Yom Tov with a condition (Beitzah 6a; Shulchan Arukh 527:22). If the day is holy then you are not doing anything and if the day is not sacred then you are making an eruv tavshilin. On the following day you can prepare for Shabbos because if that day is holy then you made an eruv tavshilin on the previous day. If it is not Yom Tov, then of course you can prepare on a weekday for Shabbos.
Nowadays, when we have no doubt which day is the “real” Yom Tov but observe two days out of rabbinic obligation, the Rambam (Mishneh Torah, Hilkhos Yom Tov 6:14-15) rules that we cannot make a conditional eruv tavshilin. The doubt no longer exists. This is a minority opinion, however. All other authorities rule that we are not stricter today than we were in olden times. If anything, we would be more lenient because we are confident that the second day is not a biblical Yom Tov.
The other option is to rely on the rabbi’s eruv tavshilin (Shulchan Arukh, Orach Chaim 527:7). Rabbis traditionally make a group eruv tavshilin that explicitly includes all members of the community. However, to maintain continuity of the tradition, they only include those who accidentally forget to make one. They exclude people who refuse to make an eruv tavshilin. If you forget to make an eruv tavshilin more than twice in a row, you cannot use the rabbi’s (although some are more lenient in today’s busy world).
III. Which Alternative to Use
Whenever someone realizes on the first day of Yom Tov that he forgot to make an eruv tavshilin, he faces the question of which option to utilize. Should he make a conditional eruv tavshilin or rely on the rabbi’s? On the one hand, the Rambam does not allow a conditional eruv tavshilin. On the other, if you rely on the rabbi’s eruv tavshilin then you lose the opportunity to fulfill the rabbinic enactment on your own. The Birkei Yosef (Orach Chaim 527:10 – link) and Kaf Ha-Chaim (527:135 – link) quote a debate over which is preferable. However, R. Akiva Eiger, in his glosses to Shulchan Arukh (527:22), quotes the Chakham Tzvi (Responsa no. 130 – link) as preferring a conditional eruv tavshilin. I believe that we can deduce similar positions from two other authorities.
The Arukh Ha-Shulchan (Orach Chaim 527:4 – link) quotes the two reasons for the eruv tavshilin offered in the Talmud (Beitzah 15b) — respect for Yom Tov or for Shabbos. The prevention of improper preparation on Yom Tov enhances the respect for the day. By requiring the cooking to begin in advance of the holiday, the eruv tavshilin also forces people to prepare for Shabbos separately, thereby increasing respect for Shabbos. When you rely on your rabbi’s eruv tavshilin, the Arukh Ha-Shulchan (loc. cit., par. 17) writes, you maintain the enhanced respect for Yom Tov but fail to prepare separately for Shabbos. Such a reliance is valid but still lacking an important element.
A conditional eruv tavshilin, however, contains both elements. One begins preparations for Shabbos an extra day in advance but maintains respect for Yom Tov. Therefore, I suggest, the Arukh Ha-Shulchan would agree that making a conditional eruv tavshilin is preferable to relying on your rabbi’s.
As always, ask your rabbi if this becomes an issue.