Hilchos Eruv Tavshilin
924. When Yom Tov falls on a Friday (as it does this Shavuos), Chazal permitted one to prepare (cook and bake) for Shabbos on Friday - Yom Tov if one made an Eruv Tavshilin before the start of Yom Tov consisting of one baked item (usually a Challah or Matzah), and one cooked (or boiled, roasted, pickled, or smoked) item (usually a boiled egg or piece of chicken or fish). {Chazal established a beracha and an additional statement of declaration to be said upon making the Eruv.} Shulchan Aruch w/Mishnah Brurah 527:1,2
925. Having placed the Eruv Tavshilin before Yom Tov one has (symbolically) begun cooking for Shabbos already, and is only completing the cooking on Yom Tov for the next day, Shabbos.
Shulchan Aruch w/Mishnah Brurah 527:1,2
926. The Challah or Matzah portion of the Eruv Tavshilin should be used for Lechem Mishnah at the Friday night and Shabbos day meals, and then should be eaten at the third Seudah on Shabbos afternoon, (since one Mitzvah has been performed with it, let it be utilized for another Mitzvah). Shulchan Aruch w/Mishnah Brurah 527:16 MB48
{For those who usually eat both loaves of the Lecehem Mishnah, the Eruv Tavshilin Challah should be eaten Friday night.} R' Shloma Zalman Auerbach in Shmiras Shabbos Kehilchasa 2:35, see also MB 274:4
927. The cooked item portion of the Eruv Tavshilin should be properly preserved (in a refrigerator if necessary) during Yom Tov so that it may be eaten at the Friday night meal. R' Shloma Zalman Auerbach in Shmiras Shabbos Kehilchasa 2:35
928. Bidieved, if one only prepared a cooked item for Eruv Tavshilin, this suffices and one may rely on it to cook for Shabbos. On the other hand, one may not rely solely on a baked item, even just to bake. Shulchan Aruch w/Mishnah Brurah 527:2 MB7
929. Bidieved if one (once) forgot to make an Eruv, or if one's Eruv inadvertently was lost or consumed on Yom Tov, one may rely on the "Gadol Ha'ir" - usually the Rov of the kehillah, who has all Jews in mind when making his Eruv. However, one may not plan to rely on the Rov intentionally, in which event the Rov's Eruv does not allow him to cook on Yom Tov for Shabbos. Shulchan Aruch w/Mishnah Brurah 527:7