Rahab lived in Jericho at the time when Israel were entering the promised land after 40 years wandering in the wilderness.

The spies sent by Joshua into the promised land went to Rahab's house:

Joshua 2 verse 1

1 Joshua the son of Nun secretly sent two men out of Shittim as spies, saying, “Go, view the land, including Jericho.” They went and came into the house of a prostitute whose name was Rahab, and slept there. 

Rahab had heard what the LORD had done in the past. This knowledge prompted her to shelter the spies and appeal for the life of herself and her family:

Joshua 2 verses 9 - 13

9 She 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. 10 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 to Og, whom you utterly destroyed. 11 As soon as we had heard it, our hearts melted, and there wasn’t any more spirit in any man, because of you: for the LORD your God, he is God in heaven above, and on earth beneath. 12 Now therefore, please swear to me by the LORD, since I have dealt kindly with you, that you also will deal kindly with my father’s house, and give me a true sign; 13 and that you will save alive my father, my mother, my brothers, and my sisters, and all that they have, and will deliver our lives from death.” 

When Jericho was conquered Joshua gave clear instructions that all in Rahab’s house should be spared destruction. These instructions were carried out:

Joshua 6 verse 17

17 The city shall be devoted, even it and all that is in it, to the LORD. Only Rahab the prostitute shall live, she and all who are with her in the house, because she hid the messengers that we sent.

Joshua 6 verse 23

23 The young men who were spies went in, and brought out Rahab with her father, her mother, her brothers, and all that she had. They also brought out all of her relatives, and they set them outside of the camp of Israel.

Rahab is named by the writer to the Hebrews as one of those who demonstrated their faith in God’s promises:

Hebrews 11 verse 31

31 By faith, Rahab the prostitute didn’t perish with those who were disobedient, having received the spies in peace.

James confirms that her faith led to action:

James 2 verse 25

25 In the same way, wasn’t Rahab the prostitute also justified by works, in that she received the messengers and sent them out another way?

Rahab married an Israelite and became an ancestress of Jesus:

Matthew 1 verse 1

1 The book of the genealogy of Jesus Christ, the son of David, the son of Abraham.

Matthew 1 verse 5

5 Salmon became the father of Boaz by Rahab. Boaz became the father of Obed by Ruth. Obed became the father of Jesse.

These chapters have links to this theme: