Mishkat al-Masabih 661
Sa‘d b. Abu Waqqas reported God’s Messenger as saying:
If anyone says when he hears the mu’adhdhin , “I testify that there is no god but God alone who has no partner and that Muhammad is His servant and Messenger; I am satisfied with God as Lord, with Muhammad as Messenger, and with Islam as religion,” his sins will be forgiven him. 

Muslim transmitted it.
وَعَنْ سَعْدِ بْنِ أَبِي وَقَّاصٍ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ أَنَّهُ قَالَ: «مَنْ قَالَ حِينَ يَسْمَعُ الْمُؤَذِّنَ أَشْهَدُ أَنْ لَا إِلَهَ إِلَّا اللَّهُ وَحْدَهُ لَا شَرِيكَ لَهُ وَأَنَّ مُحَمَّدًا عَبْدُهُ وَرَسُولُهُ رَضِيتُ بِاللَّهِ رَبًّا وَبِمُحَمَّدٍ رَسُولًا وَبِالْإِسْلَامِ دِينًا غُفِرَ لَهُ ذَنبه» . رَوَاهُ مُسلم