If Yom Tov falls out on Friday (or on Thursday and Friday outside Israel), in general, one may not cook or bake from Yom Tov for Shabbat, however, if one cooked and there was leftovers it may be eaten on Shabbat. Yet, if one designated an Eruv Tavshilin from before Yom Tov then it’s permissible to cook or bake from Yom Tov for Shabbat.
Procedure and Text
- One should hold the cooked and baked foods in one's right hand as one says the Bracha and Eruv stipulation.
- The text of the Bracha for Eruv Tavshilin is: ברוך אתה ה' אלוקינו מלך העולם אשר קדשנו במצותיו וצונו על מצות עירוב. Then one should make the following stipulation: בדין יהא שרי לן לאפויי ולבשולי ולאטמוני ולאדלוקי שרגא ולמעבד כל צרכנא מיום טוב לשבת , meaning, "With this Eruv it should be permitted for us to bake, cook, insulate food, light a candle, and do any need from Yom Tov for Shabbat". One must understand what one is saying and if one doesn't understand the Aramaic one should say it in a language one understands.
What Foods Should be Used for Eruv Tavshilin?
- A baked item such as bread and a cooked dish should be used for the Eruv Tavshilin. The cooked dish must be something which is usually eaten with bread such as a piece of meat, fish, or eggs.
- If one made the Eruv Tavshilin only using one cooked dish, after the fact it’s permissible. 
- If one made the Eruv Tavshilin only using one baked item, like bread, this isn’t considered a proper Eruv. 
- If one is only going to cook and not bake then one only needs one cooked dish. 
Size of Eruv Tavshilin
- The one baked dish and one cooked dish must be the size of a Kezayit and it’s preferable to use a whole loaf of bread and significant piece of meat or fish.
After Making Eruv Tavshilin, What Are the Laws of Cooking on Yom Tov?
- Eruv Tavshilin only permits one to cook on Friday for Shabbat and not Thursday for Shabbat.
- One should prepare the food on Yom Tov for Shabbat earlier in the day so that it will complete cooking well before Shabbat so that it’s possible it could have been used on Yom Tov. If it turns out that there’s not enough time to complete the cooking until right before Shabbat, if it’s Yom Tov Sheni one may be lenient to leave it cooking into Shabbat, but if it’s the first day of Yom Tov then one shouldn’t be lenient unless it’s a time of great need. However, some defend the practice to permit leaving the food cooking going into Shabbat even if it isn't edible by the end of the day of Friday.
Who needs an Eruv Tavshilin
- Everyone should set aside an eruv and not rely on the rabbi's eruv unless he forgot.
- Even someone who is going to be at a hotel and not cook should still set up an eruv tavshilin since one is going to need to light candles on Yom Tov for Shabbat. However, if one is only setting it in order to light candles one shouldn't recite a bracha.
- Anyone eating in the same house only needs one eruv tavshilin.
- It is permissible to ask a neighbor to set up an eruv tavshilin for you but initially you should do it yourself.
Eating the Eruv Tavshilin
- Some have the minhag to eat the Eruv Tavshilin for Seudat Shelishit.
- If the Eruv is eaten or lost one may not continue to cook on Yom Tov in preparation of Shabbat.
If one forgot to make Eruv Tavshilin
- There’s a mitzvah to make an Eruv Tavshilin upon each individual and also upon the leader or Rabbi of the city on behalf of the whole city. 
- If one forgot, was unable, or didn’t know how to make Eruv tavshilin, the first time one may rely on the Eruv Tavshilin of the Rabbi of the town. However, if one had the ability but wanted to rely on the Rabbi of the town or if he forgot twice, he may not rely on the Rabbi’s Eruv.  If one is a visitor to the town and arrived in the town right before Yom Tov after the rabbi already made an eruv tavshilin, and one forgot to make an eruv, some say that one might not be able to cook.
- If one didn’t make Eruv Tavshilin according to some poskim one may not light Shabbat candles on Yom Tov which falls out on Friday. Therefore, in such a case one should give the candles to another Jew and let them light for him or only light one candle. 
- If Yom Tov (excluding the two days of Rosh Hashana) falls out on Thursday and Friday, and one forgot to make Eruv Tavshilin before yom Tov one may make Eruv Tavshilin on the first day and stipulate “If today is Yom Tov then there’s no need for an eruv and if today isn’t Yom Tov then the eruv should be set aside in order to permit cooking and baking.”
- Some say that it’s preferable to make such a stipulation while others say that in such a case it’s better to rely on the Eruv of the Rabbi of the town. 
- Article on Eruv Tavshilin on Chabad.org
- Article on Eruv Tavshilin by Rabbi Yonason Sacks
- Ten Minute Halacha Eruv Tavshilin by Rabbi Aryeh Lebowitz
- Shulchan Aruch O.C. 527:1, Kitzur Shulchan Aruch O.C. 102:1
- Laws of Yom Tov (Rabbi Simcha Bunim Cohen, pg 279) quoting Sh"t Chaim Shaal 29
- Shulchan Aruch and Rama O.C. 527:12, Kitzur Shulchan Aruch 102:1. See Chazon Ovadyah (Yom Tov pg 294) who leaves out the text ולאטמוני and לנא ולפלוני ולפלוני או לכל בני העיר הזאת.
- Shulchan Aruch O.C. 527:2
- Shulchan Aruch O.C. 527:4, Mishna Brurah 527:11
- Shulchan Aruch O.C. 527:2
- Mishna Brurah 527:7
- Mishna Brurah 527:6
- Shulchan Aruch O.C. 527:3 writes that the baked and cooked dish should be the size of a Kezayit. Rama 527:3 adds that the bread should preferably be the size of a Kebaytzah. Kitzur Shulchan Aruch 102:1 agrees. Mishna Brurah 527:8 adds that it is a Hiddur Mitzvah to use a whole loaf of bread and significant piece of meat or fish.
- Ran (Beitzah 9b) explains that the rabbis only permitted cooking with an eruv tavshilin on Friday for Shabbat since that food is prepare for a more immediate use than if it was cooked on Thursday. Shulchan Aruch 527:13 codifies this halacha. See the Rash Mrovzavitz (cited in Yalkut Mefarshim of Oz Vehadar on Rif p. 69) who suggests that according to Rav Chisda (Pesachim 46b) this would be a biblical prohibition.
- Mishna Brurah 527:3.
- The Gemara Pesachim 46b discusses why on a biblical level it is permitted to cook on Yom Tov for Shabbat. Rabba explains that it is because one's cooking is permitted on a biblical level if potentially guests could have come to eat it. Rav Chisda explains that biblically it is permitted to cook from Yom Tov for Shabbat. On a rabbinic level an eruv tavshilin is necessary as the gemara Beitzah 15b explains either to ensure that there is enough food on Shabbat or to protect the kedusha of Yom Tov.
- Halacha: Rif Pesachim 15a, Rosh (Pesachim 3:6), Rambam (Yom Tov 1:15), Ramban (Milchamot Pesachim 15a s.v. vitmar), Rabben Dovid Pesachim 48a s.v. umeyhu, Maharam Chalavah Pesachim 48a s.v. ul'inyan, Meiri Pesachim 46b s.v. zu, and Raavad (Katuv Sham Pesachim 15a s.v. elah) all hold like Rabba. Baal Hameor (Pesachim 15a s.v. itmar) and Rabbenu Efraim quoted by Milchamot Pesachim 15a hold like Rav Chisda. Bet Yosef 527:1 explains that the Rambam holds like Rav Chisda (in addition to holding like Rav Chisda). Magen Avraham 527:1 disagrees and holds like Tosfot that there is a biblical prohibition if it isn't edible before Shabbat. Shulchan Aruch Harav 527:8 agrees. Bet Meir 527:1 and Maamar Mordechai 527:2 defends the Bet Yosef that we can hold of both the leniencies of Rabba and Rav Chisda and perhaps Rabba agreed in the end to Rav Chisda's idea. Keren Orah Shabbat 22a s.v. vgam writes that it seems from the Rambam Yom Tov 1:15 that he would employ hoil even to permit cooking right before the end of the day.
- Tosfot Pesachim 46b s.v. hoil and Meiri 46b s.v. zu write that if we hold like Rabba if the food isn't edible by the end of the day it is biblically forbidden. Magen Avraham 527:1 cites this from Tosfot Pesachim 46b, Mordechai Beitzah ch. 2, and Hagahot Maimoniyot (Yom Tov 6:1). Rav Soloveitchik in Mesorah v. 8 pp. 31-3 thinks that it is possible to argue that many rishonim even including tosfot don't hold like the Magen Avraham. Derisha 527:1 writes that the Rosh and Tur are lenient to cook right before nighttime for another reason. Biur Halacha 527:1 s.v. v'al summarizes that according to the Baal Hameor, Rabbenu Efraim, and the Rambam according to the Bet Yosef biblically it is permitted to cook from Yom Tov to Shabbat even if the food wouldn't be edible while it is still day.
- Piskei Teshuvot 527:3 writes that the practice is to rely upon the Bet Yosef who says that we follow Rav Chisda. Maamar Mordechai 527:2 defends the Bet Yosef against the Magen Avraham. Mishna Brurah 527:3 only allows relying on the Bet Yosef in extenuating circumstances of Yom Tov Sheni. Kaf Hachayim on Shulchan Arukh Orach Chayim 527:4 agrees. Aruch Hashulchan 527:3 cites the Magen Avraham and then says that the practice is to be lenient like the Rambam and Yerushalmi Beitzah 2:1 which supports him. Yalkut Yosef 527:10 (Moadim p. 497) writes that initially one should try to have all of one's food edible before Shabbat, however, in an extenuating circumstance where one didn't one can rely on the Bet Yosef.
- Rosh (Beitzah 2:3). The Haarot of Rav Elyashiv (Beitzah 16b s.v. posheh) explains that it isn't permissible initially to set up an eruv because one should really have their own cooked dish set aside for Shabbat and Yom Tov.
- Chazon Ovadia (Yom Tov p. 276), Yalkut Yosef 527:4
- Yam Shel Shlomo 2:10, Chazon Ovadia (Yom Tov p. 276), Yalkut Yosef 527:3
- Kaf Hachaim 527:57 based on the general principle of doing mitzvot yourself (Kiddushin 41a). See however, the Haarot of Rav Elyashiv (Beitzah 16b s.v. posheh) who seems to allow this even initially.
- Mishna Brurah 527:11, Kitzur Shulchan Aruch 102:1
- Shulchan Aruch O.C. 527:15
- Shulchan Aruch O.C. 527:7
- Shulchan Aruch 527:7, Mishna Brurah 527:22
- Haarot of Rav Elyashiv (Beitzah 16b) explains that if one only arrived after the rabbi already made the eruv he wasn't included in the eruv unless the rabbi specifies the people who will come after he makes the eruv.
- Shulchan Aruch 527:19
- Mishna Brurah 527:55
- Shulchan Aruch O.C. 527:22
- Piskei Teshuvot 527:21