Deuteronomy 12
v1-4: Because there is only one God, "God is to be worshipped, and only he." This is the first commandment, and "the second commandment is a means of protecting and guarding the first." In order to stop us "turning to false gods, the true God forbids us to worship him in such a way as the false gods were worshipped." We are to worship God as He has commanded us to, "so that we may continue" to worship God.
v5-32: The Israelites were to bring their sacrifices only to the altar set up in the court of the tabernacle, and only perform their ceremonies there. The reason for this was "to prevent the introduction of sinful customs to their worship" and that "they might continue to be united in their ways and their hearts." Prayers and praises, however, "were to be offered every day by the people of God wherever they were."
Deuteronomy 13
v1-5: When you are encouraged to follow after other gods, or to worship God by means of idols, God is allowing you to be attacked by such a temptation to test your faithfulness. You are not to do what you are being tempted to do, and you are not even to listen to the temptation. "Some temptations are so terribly evil that they will not bear discussion, and we should not even listen to them in the slightest."
v6-11: Sometimes the temptation to sin against God comes "from a brother or child who is naturally close to us, [or] from a [husband or] wife or friend whom we are close to by choice." For example, "Satan tempted Adam through Eve and he tempted Christ through Peter." It is your duty to put God and your faith before family and friends.
v12-18: If there is a city that once worshipped the true God, but now is idolatrous and follows other gods, "all Israel was to go to war against it, to give a sign of their anger against idolatry and to stop the contagion from spreading." This principle applies today to the church. If a local church rejects God and the gospel, other local churches which are faithful, should withdraw their fellowship with it unless there is repentance.