ט מִצְוָה גְדוֹלָה לְהִתְפַּלֵּל בְּבֵית הַכְּנֶסֶת אוֹ בְּבֵית הַמִּדְרָשׁ שֶׁהֵם מְקוֹמוֹת מְקֻדָּשִׁים, וַאֲפִלּוּ אִם לִפְעָמִים מִתְבַּטֵּל, שֶׁאֵין שָׁם מִנְיָן, מִכָּל מָקוֹם מִצְוָה לְהִתְפַּלֵּל שָׁם בִּיחִידוּת, כֵּיוָן שֶׁהֵן מְקוֹמוֹת מְקֻדָּשִׁים. וּמִי שֶׁדַּרְכּוֹ לִלְמֹד בְּבֵית הַמִּדְרָשׁ, יִתְפַּלֵּל גַּם כֵּן שֶׁמָּה בַּעֲשָׂרָה אַף עַל פִּי שֶׁיֵּשׁ בְּעִירוֹ גַם בֵּית הַכְּנֶסֶת. אֲבָל מִי שֶׁאֵין דַּרְכּוֹ לִלְמֹד בְּבֵית הַמִדְרָשׁ, יִתְפַּלֵּל בְּבֵית הַכְּנֶסֶת שֶׁיֵּשׁ בּוֹ רֹב עָם, וּבְרָב עָם הַדְרַת מֶלֶךְ. וְאִם יֵשׁ בְּעִירוֹ שְׁנֵי בָתֵּי כְנֵסִיּוֹת, יֵלֵךְ לְהָרָחוֹק, שֶׁיִהְיֶה לוֹ שְׂכַר פְּסִיעוֹת. אָמַר רַבִּי יְהוֹשֻׁעַ בֶּן לֵוִי, לְעוֹלָם יַשְׁכִּים אָדָם לְבֵית הַכְּנֶסֶת כְּדֵי שֶׁיִּמָּנֶה עִם עֲשָׂרָה הָרִאשׁוֹנִים, שֶׁאֲפִלּוּ מֵאָה בָּאִים אַחֲרָיו, נוֹטֵל שָׂכָר כְּנֶגֶד כֻּלָּם. עוֹד אָמְרוּ רַבּוֹתֵינוּ זִכְרוֹנָם לִבְרָכָה, כָּל מִי שֶׁהוֹלֵךְ שַׁחֶרִית וְעַרְבִית לְבֵית הַכְּנֶסֶת אוֹ לְבֵית הַמִּדְרָשׁ בִּזְמַן הָרָאוּי, וּמִתְאַחֵר שָׁם כָּרָאוּי, וּמִתְנַהֵג שָׁם בִּקְדֻשָּׁה כָּרָאוּי, זוֹכֶה לַאֲרִיכוּת יָמִים, דִּכְתִיב, אַשְׁרֵי אָדָם שֹׁמֵעַ לִי לִשְׁקֹד עַל דַּלְתֹתַי יוֹם יוֹם לִשְׁמֹר מְזוּזֹת פְּתָחַי. וּכְתִיב בַּתְרֵהּ, כִּי מֹצְאִי מָצָא חַיִּים.
9 It is a great mitzvah to pray in a synagogue or in a Beis Midrash because these are sacred places. Even if it happens that there is no minyan, it is nevertheless a mitzvah to pray there even when praying alone, because these are holy places. If you usually study in a Beis Midrash you should also pray there, with ten people, even though in your city there is also a synagogue. However, if you are not accustomed to study in a Beis Midrash, you should pray in a synagogue where there is a multitude of people, for "In the multitude of people is the glory of the king." If there are two synagogues in your city, you should go to the more distant one, in order to earn a reward for the added steps. Said Rabbi Yehoshua ben Levi: "A person should always awaken early and go to a synagogue in order to be counted among the first ten people, because even if a hundred come after him, he receives a reward equal to all of them." Our Sages, of blessed memory, have also said: "Whoever goes morning and evening to the synagogue or to the Beis Midrash in the proper time, and remains there the proper amount of time, and conducts himself there with proper sanctity, will merit long life, as it is written: 'Fortunate is the man who listens to Me, watching daily at My gates, waiting at the posts of My door.' And it is written following this: 'For whoever finds Me finds life.'",