Question :
Sometimes I go into a market , shop or a car and in it I hear the forbidden singing. So is it permissible for me to buy from that shop or ride in that car , or do I have to leave immediately ?
وعليكم السلام ورحمة الله وبركاته
If you are able to change and forbid that evil which is the forbidden music , then do it , even with advice or guidance etc. as how the Prophet صلى الله عليه وسلم said ( Whosoever of you sees an evil, let him change it with his hand; and if he is not able to do so, then [let him change it] with his tongue; and if he is not able to do so, then with his heart — and that is the weakest of faith. )
If you see such a change is difficult for you to apply due a certain reasons , then you must still hate it in your heart and wish that evil ceases because you are not satisfied with it , and this is the minimum level of faith you should have towards that evil as menioned in the previous hadith.
After all that , there is nothing wrong with you taking what you need from that shop and its like , then leaving if you have finished your need since the sound of singing and music there will not harm your heart and faith إن شاء الله , because you did not ask for it and also your heart did not accept it.
And the scholars differentiate between merely listening ( سماع ) and accepting to listen ( استماع ) to that which is forbidden , because the ears may perceive sounds that a person does not like or accept , therefore there is no effect on the soul from that listening . There is an effect on the soul only if he listens to that whilst seeking and intending it .
And here is the text of Ibn Taymiyyah , may Allah عز وجل have mercy on him, regarding the difference between those two from al-Majmoo’. He said : Indeed praise or blame occurs only upon Istimaa ( intending to listen ) and not upon Samaa ( merely listening ) . Therefore the one who listens to the Quran with intention is rewarded and the one who merely listens to the Quran without any intention is not rewarded because actions are only by way of intentions . Similarly , if the person listens to that which is forbidden from amusements without any intention then it will not harm him.
And Allah عز وجل knows best .