סימן יז סעיף י
קָרָא קְרִיאַת שְׁמַע וְנִכְנַס לְבֵית הַכְּנֶסֶת, וּמָצָא צִבּוּר שֶׁקּוֹרִין קְרִיאַת שְׁמַע, צָרִיךְ לִקְרֹת עִמָּהֶם כָּל קְרִיאַת שְׁמַע, שֶׁלֹּא יֵרָאֶה כְּאִלּוּ אֵינוֹ רוֹצֶה לְקַבֵּל עֹל מַלְכוּת שָׁמַיִם עִם חֲבֵרָיו, וִיקַבֵּל שָׂכָר כְּקוֹרֵא בַּתּוֹרָה, וְהוּא הַדִּין אִם הוּא בְּבֵית הַכְּנֶסֶת, וְאוֹמֵר דִּבְרֵי תַּחֲנוּנִים, אוֹ פְּסוּקִים בְּמָקוֹם שֶׁרַשַּׁאי לְהַפְסִיק (וְאִם עוֹמֵד בְּמָקוֹם שֶׁאֵינוֹ רַשַּׁאי נִתְבָּאֵר לְעֵיל) וְאִם הוּא עֲדַיִן לֹא קָרָא קְרִיאַת שְׁמַע, קוֹרֵא גַּם כֵּן עִם הַצִבּוּר, אֲבָל צָרִיךְ שֶׁיִּתְכַּוֵּן שֶׁלֹּא לָצֵאת יְדֵי חוֹבָתוֹ, כְּדֵי שֶׁיִּקְרָא אַחַר כָּךְ עִם הַבְּרָכוֹת, וְכֵן שְׁאָר דְּבָרִים שֶׁהַצִבּוּר אוֹמְרִים, כְּגוֹן תְּהִלָּה לְדָוִד, וְעָלֵינוּ, וְכַדּוֹמֶה וַאֲפִלּוּ פִּיּוּטִים אוֹמֵר עִמָּהֶם, וְאַל יִפְרֹשׁ אֶת עַצְמוֹ מִן הַצִּבּוּר.
If you had already read the Shema and entered the synagogue and found the congregation reading the Shema, you must read the entire Shema with them, so that it does not appear as though you are unwilling to accept the yoke of the Kingdom of Heaven with the congregation. Your reward [for reading the Shema again], will be that of one who reads the Torah. The same rule applies if you are in a synagogue reciting supplications or verses [of Torah] where interruptions are permitted, (the procedure to follow if you are at a place where interruptions are prohibited, has been previously explained [See Chapter 16: 2.]) and you have not yet read the Shema, you should read it with the congregation but with the intention not to fulfill your obligation [at this time], so that you can read it later with its berachos. This rule also applies to other prayers that the congregation is reciting such as the psalm Tehillah leDavid [Ashrei], and Alenu and the like. Even Piyutim20Piyutim are special hymns that are said in some congregations during the Festivals. should be said with them, for you must never separate yourself from the congregation.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)