All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu 'alyhi wa sallam, is His slave and Messenger.
Muslims are obligated to learn the matters of religion, particularly Tawheed (Islamic monotheism) because it is the basis of religion. When the Messenger of Allaah, sallallaahu ‘alayhi wa sallam, sent Mu‘aath to Yemen, the first thing he ordered him to do was to ask the people of Yemen to believe in the oneness of Allaah The Almighty. [Al-Bukhari]
Muslims should also learn the matters of faith, disbelief, Nifaaq (hypocrisy), and both major and minor Shirk. By doing so, the person will be assured of his faith and Tawheed to his Creator.
To be safe from the dangers of Shirk (polytheism), he should say the following supplication (Du‘aa’): "Allaahumma Inni A‘oothu bika An 'Ushrika bika wa ’Ana A‘lam wa Astaghfiruka li ma la A‘lam (O Allaah! Make me not associate anything with You, while being aware of doing so. And I ask You to forgive me if I have unintentionally associated anything with You.)" [Al-Bukhari in Al-Adab Al-Mufrad]
The Messenger of Allaah, sallallaahu ‘alayhi wa sallam, told Abu Bakr that if he said this Du‘aa’, he would be safe from Shirk, whether major or minor. Al-Albaani declared this Hadeeth (narration) as Saheeh.
If a person lives in an environment that is far from Sunni scholars, then he finds himself committing acts of Shirk, he must stop doing these acts and repent to Allaah The Almighty immediately. He is pardoned for his previous actions as he was ignorant of their ruling. A person cannot be declared a non-Muslim if he does an act of disbelief out of ignorance. This is the opinion of Ibn Taymiyyah .
This is supported by the following Hadeeth: When a disobedient man was on his death bed, he ordered his sons to burn and grind his ashes— after his death— and then scatter his ashes in the air. The man did so because he was afraid of the punishment of Allaah The Almighty and because he was ignorant of the fact that Allaah The Almighty can reassemble him. When he died, his sons did as he had told them. Allaah The Almighty reassembled him and asked him why he had done that even though Allaah The Almighty knows the reason. He said that he feared Him, so Allaah The Almighty forgave him. [Al-Bukhari and Muslim]
I advise you to be keen on being steadfast in doing good deeds, on accompanying those who adhere to the principles of Ahlus Sunnah wal Jamaa‘ah, and on seeking knowledge.
Allaah Knows best.