Bible Notes Online - Joshua 2 - ESV
Commentary

v1: No doubt Rahab was despised by the people of Jericho; but the testimony of Scripture is that she believed God (v11; Heb 11.31). The label 'prostitute,' even if deserved, was no barrier to God's grace to forgive, and power to change her heart.

v2-3: The King of Jericho had word of the spies, and even that they had gone to Rahab's house.

v4-7: Rahab diverted those looking for the spies. Her explanation sent the pursuers away, giving the spies time to complete their mission.

Rahab is criticised by some for lying. But she identified with the people of God. 

v8-11: There was fear amongst the people of Jericho; they recognised that God was with Israel (compare John 3.2). Rahab picked out the crossing of the Red Sea, and the defeat of the Amorite kings as evidence of God's power, and of His presence with Israel.

The same message is declared. Some respond with fear, and some respond in faith. This is a mystery to us. We think of the two thieves dying next to Jesus Christ; one rejected and one accepted Him as the Messiah.

v12-13: Rahab recognised that the only God, the Lord of Heaven and Earth, was the God of Israel. Her faith was evidenced by her concern for her family Although many of the people feared because of Israel’s victories, Rahab actually trusted in God. She repeatedly says 'Lord,' ie: Yahweh, indicating an understanding of the true God.

Rahab's faith was shown by her kindness to the spies. And it was clearly God's hand that led the spies to her house, the only one in the city with faith in God.

v14: The spies had learned from Moses and Joshua; the Lord would give them the land.

v15-17: The position of Rahab's house, on the wall of the city, was convenient; another sign of God's overruling. It was easy for the spies to escape; later it was easy for Rahab to leave the sign of the scarlet thread in the window so as to be found.

v18-21: The scarlet thread was the guarantee of Rahab's security, compare Ex 12.22, "Not one of you shall go out"; safety is guaranteed under the blood. The picture here is of security in Christ, and true faith in Him.

The midwife put a scarlet thread on the wrist of Zerah, the first born of Judah son of Jacob (Gen 38.30). It was a sign of the first born blessing.

v22-24: The confident report of the spies contrasted with the original report of the twelve spies (Num 13). Joshua rightly took courage from their report. Good news is 'sweet to the soul and healing to the bones' (Prov 16.24).