21 Then Joshua, the son of Nun, sent two men from Shittim secretly, with the purpose of searching out the land, and Jericho. So they went and came to the house of a loose woman of the town, named Rahab, where they took their rest for the night. 2 And it was said to the king of Jericho, See, some men have come here tonight from the children of Israel with the purpose of searching out the land. 3 Then the king of Jericho sent to Rahab, saying, Send out the men who have come to you and are in your house; for they have come with the purpose of searching out all the land. 4 And the woman took the two men and put them in a secret place; then she said, Yes, the men came to me, but I had no idea where they came from; 5 And when it was the time for shutting the doors at dark, they went out; I have no idea where the men went: but if you go after them quickly, you will overtake them. 6 But she had taken them up to the roof, covering them with the stems of flax which she had put out in order there. 7 So the men went after them on the road to Jordan as far as the river-crossing: and when they had gone out after them, the door into the town was shut.
Matthew Henry's Commentary on Joshua 2:1-7
Commentary on Joshua 2:1-7
(Read Joshua 2:1-7)
Faith in God's promises ought not to do away, but to encourage our diligence in the use of proper means. The providence of God directed the spies to the house of Rahab. God knew where there was one that would be true to them, though they did not. Rahab appears to have been an innkeeper; and if she had formerly been one of bad life, which is doubtful, she had left her evil courses. That which seems to us most accidental, is often overruled by the Divine providence to serve great ends. It was by faith that Rahab received those with peace, against whom her king and country had war. We are sure this was a good work; it is so spoken of by the apostle, James 2:25; and she did it by faith, such a faith as set her above the fear of man. Those only are true believers, who find in their hearts to venture for God; they take his people for their people, and cast in their lot among them. The spies were led by the special providence of God, and Rahab entertained them out of regard to Israel and Israel's God, and not for lucre or for any evil purpose. Though excuses may be offered for the guilt of Rahab's falsehood, it seems best to admit nothing which tends to explain it away. Her views of the Divine law must have been very dim: a falsehood like this, told by those who enjoy the light of revelation, whatever the motive, would deserve heavy censure.