סימן קסז סעיף ג
נֵרוֹת שֶׁהִדְלִיקוּ לְפָנֶיהָ, וְאַחַר כָּךְ כִּבָּן הַגּוֹי לְצֹרֶךְ עַצְמוֹ וּמְכָרָן לְיִשְֹרָאֵל, מֻתָּרִין, דְּכֵיוָן שֶׁכִּבָּן לְצֹרֶךְ עַצְמוֹ, זֶהוּ בִּטּוּלָן. וּמִכָּל מָקוֹם אֵין לַעֲשׂוֹת מֵהֶן נֵרוֹת שֶׁל מִצְוָה. וְכֵן כָּל דָבָר שֶׁל עֲבוֹדָה זָרָה, אַף עַל פִּי שֶׁנִּתְבַּטֵּל וּמֻתָּר לְהֶדְיוֹט, אָסוּר לִדְבַר מִצְוָה, מִשּׁוּם דִמְאִיסֵי לִגְּבוֹהַ.
It is permitted to benefit from candles that were lit (in front of an idol), and thereafter extinguished by a heathen, to be used for his own benefit, and were subsequently sold to a Jew. Since the heathen extinguished them to use for his own purpose, this act constitutes their annulment. Nevertheless, such candles should not be used for the performance of a mitzvah. Similarly, everything that was used for an idol, although it has been annulled, and is permitted for common use, is forbidden to be used for a mitzvah because they are abominable to the Almighty.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)