It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever hears the sound of a church bell, or enters a church, a place of worship, a fire temple or an idol house, and says: 'La ilaha illa Allah, wa la na'budu illa Allah' (There is no god worthy of worship but Allah, and we worship none but Allah), Allah will record for him a reward equal to the number of those who do not say it, or he will be recorded with Allah as a siddiq (truthful one)."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 12637