1 Samuel 7:3
And Samuel spake unto all the house of Israel, saying, If ye do return unto the LORD with all your hearts, then put away the strange gods and Ashtaroth from among you, and prepare your hearts unto the LORD, and serve him only: and he will deliver you out of the hand of the Philistines.
Samuel's call belongs to the time when as a child he remained true to Heaven in the midst of evil, while the sins of Eli and his sons shut out the Holy Spirit from them, so the Lord passed by Eli to call Samuel and commission him as a prophet of the Most High with a message of condemnation to the house of Eli. His word to all the house of Israel came after twenty years under Philistine power following the bringing of the ark to Kirjath-jearim. That oppression continued because of persistent irreligion and idolatry, and it was spoken at the time when Samuel's work in visiting cities and villages to turn hearts back to the God of their fathers had led the people to mourn after the Lord.
Returning to the Lord with all the heart means putting away the strange gods and Ashtaroth from among them, preparing the heart unto the Lord, and serving Him only, with the promise of deliverance out of the hand of the Philistines. Israel was greatly humbled and repented of sins, Samuel interceded for them, and God was again merciful to them. When the Philistines made war with them the Lord worked in a miraculous manner for Israel so that they overcame their enemies and were delivered.
The requirement is practical piety and heart religion, the same heart religion Christ taught when upon the earth. Without the grace of Christ outward forms of religion were valueless to ancient Israel and are the same to modern Israel. The verse therefore calls for a revival of true heart religion today just as ancient Israel experienced. Returning to the Lord begins with repentance as the first step that no one can take for another, requiring each person to individually humble the soul before God and put away idols. That turning includes turning from backsliding with sorrow, serving God wholeheartedly, and following the light He has given. When people have done all that they can do, the Lord hears their appeal, manifests His salvation, blesses them and delivers them.