Two spies were sent into Jericho. Somehow or other the king of Jericho heard about it, and even knew where they had gone. So the king sent a message to Rahab telling her to give the men up.
However, Rahab did not do this. Hebrews tells us that this was an act of faith, she saw that God was with the Israelites. The tales of what God had done for the Israelites had spread far and wide, and had persisted through many years (for it was now about forty years since the Red Sea incident). When Jesus came miracles were a key part of His ministry, as they were for the apostles. Presenting the gospel is not just a matter of words, but of actions. And it is not just our actions, but the actions of God Himself.
Rahab made a deal with the Israelite spies and they promised her safety when the invasion came.,
The report the spies gave to Joshua is in marked contrast to the report of the spies on the infamous expedition under Moses. Here they report that the enemy is in fear and trembling, rather than the converse which Moses' spies reported (or at least ten of them did).