Transliteration
ye’pyanya-devatā-bhaktā yajante śraddhayānvitāḥ |
te’pi mām-eva kaunteya yajanty-avidhi-pūrvakam || 23 ||
Translation
Even those who, endowed with faith are devoted to other deities, they worship Me alone, O Kaunteya, in an indirect manner.
Purport
This Shloka is one of those Shlokas which explain the polytheism in Sanatan Dharma. In earlier two Shlokas Bhagvan Shri Krishna described two situations, 1. Those who have desires of elevated life and worship deities 2. Others who do not want anything either in this life or afterlives but only want to reach to Shri Krishna. The latter case is obviously the best as such devotee as Shri Krishna explained comes under the direct responsibility of Shri Krishna.
But even those devotees who worship other deities using different methods actually indirectly worship Shri Krishna only. The difference is that they have different wishes and desires.
All worship, no matter which deity it is offered to and what method is used, reach Shri Krishna. As declared at many places in Shrimad Bhagvad Gita, in Ch4 Shri Krishna said like this
"All, who in whatever way worship me, I reward them accordingly as all men ultimately follow my path in all respects, O son of parth (Arjuna)."
Ch4: Sh11