סימן צה סעיף יד
אֵין מְעָרְבִין עֵרוּבֵי תְּחוּמִין אֶלָּא לִדְבַר מִצְוָה, כְּגוֹן לְהִתְפַּלֵּל בַּעֲשָׂרָה, אוֹ לְהַקְבִּיל פְּנֵי רַבּוֹ, אוֹ חֲבֵרוֹ שֶׁבָּא מִן הַדֶּרֶךְ, אוֹ לִסְעוּדַּת מִצְוָה, אוֹ לְפַקֵּחַ עַל עִסְקֵי רַבִּים, אוֹ שֶׁהוּא בָּא מִן הַדֶּרֶךְ וְרוֹצֶה לֵילֵךְ לְבֵיתוֹ וְכַדּוֹמֶה (תט"ו).
An eiruvei techumin should be made only in order to do a mitzvah33If the eiruv was not made for a mitzvah purpose, some say that it is not valid [Bahag, Rashba etc.] and others say it is valid. [Rambam, Tosafos, Rosh etc.] Eliyahu Rabba says that you can be meikil if there is an urgent need. Mishnah Berurah 415: 1 is meikil even when there is no urgent need, as are the Chayei Adam and Shoeil Umeishiv. such as to pray with a minyan, or to meet your Rebbe, or a friend who arrived from a journey,34Making an eiruv to meet a friend is permitted only if he is arriving from a journey, but meeting your Rebbe is always a mitzvah. [see Sha’ar Hatziyun] or to (attend) a banquet in honor of a mitzvah, or to take care of communal affairs, or if you had returned from a journey and wanted to go home, or similar things.35It is permitted even in order to stroll through the park to enjoy Yom Tov or Shabbos. [Rema 515: 1]
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)