“shepherds.” The Hebrew reads “shepherds,” and in this case it refers to the rulers, who were the shepherds over the people. In the New Testament, “shepherds” usually refers to the pastors over the people in the Church, but that is not its use here.
“walked after things that do not profit.” This refers to following (and thus worshipping) pagan idols, and is perhaps a second reference to Baal. The reason the verse ends with “things that do not profit” seems to be to make a word play in Hebrew that would catch people’s attention. The name for the god Baal is ba’al (בַּעַל) while the verb “do not profit” is spelled ya’al (יַעַל). So the people prophesied by ba’al and walked after ya’al. People reading the Hebrew text would catch the nuance (and perhaps learn from the reproof as well), and the Hebrews were fond of puns and word plays.