“all the temples at the shrines.” The Hebrew is more literally, “the houses of the shrines,” and it refers to the temples that were built at the local shrines. These “houses” were the temples of the pagan gods. A temple was often called the “house” of the god (see commentary on Num. 33:52).
“in the cities of Samaria.” So Josiah went through the territory of Israel as well as Judah destroying the pagan shrines.