In the Yerushalmi Pesachim on daf Bet amud Bet, it talks about the "Kutim" and how whenever they keep a mitzvah, they are more exacting/cautious about it than the Jews. Who are these Kutim, why does it say this about them, and what happened to them over time?
The Shomronim/Samaritans were populating the area of Samaria in Israel by Sancherev and were originally from several places included Kutta hence they are referred to by their original names in the Gemara Chullin 6a as the "Kuttim". See Melachim 2 17,24:
וַיָּבֵא מֶלֶךְ אַשּׁוּר מִבָּבֶל וּמִכּוּתָה וּמֵעַוָּא וּמֵחֲמָת וּסְפַרְוַיִם וַיֹּשֶׁב בְּעָרֵי שֹׁמְרוֹן תַּחַת בְּנֵי יִשְׂרָאֵל
According to Gittin 9b https://www.sefaria.org/Gittin.10a.7?lang=bi&with=all&lang2=en There are 3 opinions that hold Cuttim are true converts like Rebbi Meir Nidda 56b who argues with Chachomim who say they are not true converts:
1.Tanna Kamma (R' Meir) holds they are no different from regular Jews
2.R' Elazar holds they don't keep the Mitzvos probably so we cannot rely on there Matza
3.Rabban Shimon ben Gamliel says that if they are known to keep Mitzvos they keep them very carefully, but Mitzvos that they are not known to keep e.g Mitvos derabanan, This is the view of the Yerushalmi Pesachim.
Even though there is a Machlokes Rabbi Meir and Rabbanan (Nidda 56b) whether Kutim were true converts or not, even Rabbi Meir accepted in the end that since they found a graven idol of a Dove that they were not Jewish see Chullin 6b.
Read this fascinating passage about Ezra and the Excomunication of the Kuttim quoted in Tosfos Gittin 9b From Pirkei derabbi Eliezer Ch37 https://www.sefaria.org/Pirkei_DeRabbi_Eliezer.38.23?lang=bi&with=all&lang2=en According to Rabbanan that the Kutim were Geirei Arayot i.e. they weren't genuine and converted because they were eaten by lions, the Kuttim were banned from the people of Israel in the time of Ezra, even though initially they were thought to be Jewish:
The Shulchan aruch Orach Chaim 215,2 says:
אם היה המברך אפיקורוס או כותי או תינוק, או היה גדול ושנה ממטבע הברכות, אין עונין אחריו אמן I.e a Kutti is not Jewish so we Don't say "amen" to his Brochos.
The Mishna Berura says:
ואע"ג דבגמרא אמרינן שאף בכותי עונין אם שמע כל הברכה מפיו היינו קודם שמצאו להן דמות יונה בהר גרזים שהיו עובדין לה אבל אח"כ לא דכונתן להר גרזים Even though the Gemora talks about Theoretical cases of Kutim this was before an idol of a dove was found on Mount Gerizim which they were worshipping but after (e.g nowadays) they are idol worshippers and not Jewish.
So we can't pray in their temples as we consider them idolitors nowadays.