Before the men lay down, she came up to them on the roof and said to the men, “I know that the Lord has given you the land, and that the fear of you has fallen upon us, and that all the inhabitants of the land melt away before you. For we have heard how the Lord dried up the water of the Red Sea before you when you came out of Egypt, and what you did to the two kings of the Amorites who were beyond the Jordan, to Sihon and Og, whom you devoted to destruction. And as soon as we heard it, our hearts melted, and there was no spirit left in any man because of you, for the Lord your God, he is God in the heavens above and on the earth beneath. Now then, please swear to me by the Lord that, as I have dealt kindly with you, you also will deal kindly with my father’s house, and give me a sure sign that you will save alive my father and mother, my brothers and sisters, and all who belong to them, and deliver our lives from death.” And the men said to her, “Our life for yours even to death! If you do not tell this business of ours, then when the Lord gives us the land we will deal kindly and faithfully with you.” Joshua 2:8-14.
Conversion changes everything. Rabab was a prostitute, and a Canaanite woman at that. The Lord has already given commands to his people not to take Canaanite wives, and a prostitute would be stoned yo death. Yet, because she believed that the God of Israel was the most high God, and she hid the spies and saved them at the risk of her own life, she was spared. Not only that, but she would marry an Israelite named Salmon, give birth to Boaz, who would one day marry Ruth, a Moabitess who had come to faith in God through her mother-in-law, Naomi. Her bloodline would lead to King David, and eventually, to Jesus.
Rahab had heard and believed the testimony of what God had done to Egypt and to the Amorites. She knew they were next. She acted on what she believed and asked for mercy. This changed her destiny.