סימן קב סעיף ה
צָרִיךְ שֶׁיְהֵא הָעֵרוּב קַיָּם עַד שֶׁהֵכִין כָּל צָרְכֵי שַׁבָּת. אִם נֶאֱבְדָה אוֹ נֶאֱכְלָה הַפַּת, אֵין בְּכָךְ כְּלוּם, וּמֻתָּר אֲפִלּוּ לֶאֱפוֹת. וְאִם נֶאֱבַד אוֹ נֶאֱכַל הַתַּבְשִׁיל, אִם נִשְׁאַר כַּזַּיִת, גַּם כֵּן לֹא הִפְסִיד. אֲבָל אִם לֹא נִשְׁתַּיֵּר מִמֶּנּוּ כַּזַּיִת, אָסוּר לוֹ לְבַשֵּׁל, כְּאִלּוּ לֹא עֵרַב כְּלָל. וְכֵיצַד עוֹשֶׂה מִי שֶׁלֹּא עֵרֵב. אִם לֹא נִזְכַּר עַד אַחַר סְעוּדַּת שַׁחֲרִית, וְאֵין שָׁם בַּמָּקוֹם הַהוּא יִשְֹרָאֵל אַחַר שֶׁעֵרַב, אֵינוֹ מֻתָּר לוֹ אֶלָּא לְבַשֵּׁל קְדֵרָה אַחַת, וְלֶאֱפוֹת פַּת אַחַת, וּלְהַדְלִיק נֵר אֶחָד לַשַׁבָּת. וְאִם נִזְכַּר קֹדֶם שֶמְבַשֵּׁל לִסְעוּדַּת שַׁחֲרִית, יָכוֹל לְבַשֵׁל מִכָּל מִין בִּקְדֵרָה גְּדוֹלָה וּלְהוֹתִיר לַשַׁבָּת. וְאִם יֵשׁ שָׁם מִי שֶׁעֵרַב, יִתֵּן לָזֶה בְּמַתָּנָה קִמְחוֹ וּבְשָׂרוֹ וְכָל הַשַּׁיָּךְ לָזֶה. וְהוּא יִזְכֶּה בִּדְבָרִים אֵלּוּ בְּהַגְבָּהָה, וִיבַשֵּׁל וְיֹאפֶה עֲבוּרוֹ, וַאֲפִלּוּ בְּבֵיתוֹ שֶׁל זֶה שֶׁלֹּא עֵרַב.
The eiruv must remain in tact until you have prepared all your Shabbos needs.15If you started preparing food (like cutting vegetables to cook) and then, the eiruv was lost, you may continue and complete the preparation of that food. If the bread (of the eiruv) was lost or eaten, it also does not matter; and you are allowed even to bake for Shabbos. But if the cooked food was lost or eaten, if a kazayis is left it doesn't matter. But if less than a kazayis is left, it is forbidden to cook [for Shabbos,] just as if you had made no eiruv.16From this it seems that you may not bake, even though the bread was left. If you made a proper eiruv, but the cooked component was lost and you are left with the bread alone, Sha’arei Teshuvah 527:13, and Penei Yehoshua’s (Responsum 15) rule that if you are lenient and rely on it, you have not done anything wrong. The Semak also rules that you may rely on the baked component. What should you do if you made no eiruv? If you thought of it after the morning (Yom Tov) meal, and in that community there is no other Jew who made an eiruv,17Shulchan Aruch 527:2. The Magein Avraham, Darkei Moshe say that if there is another Jew, you must do as prescribed (at the end of this paragraph) and may not cook even one dish etc., but the Mishnah Berurah 527:61 (Acharonim (Reshal etc.) hold that the choice is yours. you are perrmitted to cook only one pot,18Large enough for all your Shabbos needs. Even if you have challah in the house, but it is not enough for Shabbos, you may bake one more to meet those needs. (Sha’ar Hatziyun 527:89) bake only one loaf of bread, and light one19This is in accordance with most Rishonim who require an eiruv in order to light the Shabbos candles. Rambam, Bach, Knesses Hagedolah, Birkei Yosef etc. permit the lighting of candles even without an eiruv. Mishnah Berurah 527:55 rules that it is proper to be stringent. candle for Shabbos. If you thought of it before cooking the morning (Yom Tov) meal, you may cook all kinds of foods in a large pot20This means each kind may be cooked in a pot large enough to suffice for both Yom Tov and Shabbos. and leave some over for Shabbos. If there is someone there who made an eiruv, you should give him as a gift, your flour, meat and all other ingredients. The one who made the eiruv acquires possession of these items by lifting them up,21One tefach high. (Shulchan Aruch Harav 527:28) and then he may cook and bake for you, even in your house though you did not make an eiruv.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)