येऽप्यन्यदेवता भक्ता यजन्ते श्रद्धयाऽन्विताः। तेऽपि मामेव कौन्तेय यजन्त्यविधिपूर्वकम्
ye ’pyanya-devatā-bhaktā yajante śhraddhayānvitāḥ te ’pi mām eva kaunteya yajantyavidhi-pūrvakam
Even those who worship the lesser powers, if they do so with faith, they are thereby worshipping Me, though not in the correct manner.
Translated by Shri Purohit Swami
Even those devotees who, endowed with faith, worship other gods, worship Me alone, O Arjuna, but by the wrong method.
Translated by Swami Sivananda
Word meanings (from the gita/gita dataset)
ye—those who; api—although; anya—other; devatā—celestial gods; bhaktāḥ—devotees; yajante—worship; śhraddhayā anvitāḥ—faithfully; te—they; api—also; mām—me; eva—only; kaunteya—Arjun, the son of Kunti; yajanti—worship; avidhi-pūrvakam—by the wrong method