And Joshua the son of Nun sent two men secretly from Shittim as spies, saying, “Go, view the land, especially Jericho.” And they went, and came into the house of a harlot whose name was Rahab, and lodged there. Josh. 2:1
In the Hebrew she is called a woman before she is designated a prostitute. This is the common word for prostitute and not a temple prostitute.
FYI: In Hebrew there are two words for prostitute, zonah which is an ordinary prostitute, or a woman who sells her body for material goods.
Then there is kedeshah which is the word for holy kedosh in a feminine form. The kedeshah were temple prostitutes or the holy or set apart for the god or goddess. This form of prostitution was forbidden by God. News travels fast in small towns. Even the kings knew that she has taken in men that were spies. However Rahab played dumb and claimed she didn’t know that they were spies. When in reality she has hid them on the roof.
3 Then the king of Jericho sent to Rahab, saying, “Bring forth the men that have come to you, who entered your house; for they have come to search out all the land.” 4 But the woman had taken the two men and hidden them; and she said, “True, men came to me, but I did not know where they came from; 5 and when the gate was to be closed, at dark, the men went out; where the men went I do not know; pursue them quickly, for you will overtake them.” 6 But she had brought them up to the roof, and hid them with the stalks of flax which she had laid in order on the roof. 7 So the men pursued after them on the way to the Jordan as far as the fords; and as soon as the pursuers had gone out, the gate was shut. Josh. 2:3-7
She explains to the men that she has heard all that YHWH had done for the people of Israel since they left Egypt. Unlike most Christians of today this pagan woman knew God’s personal name. Even though she lied about knowing anything about these men, she knew everything. It is like she had been collecting information on these people for years. She has been learning all she could about this people and their God. Not only was her bravery was rewarded by her and her family surviving. She is in the great list of the faithful in Hebrew 11.
By faith Rahab the harlot did not perish with those who were disobedient, because she had given friendly welcome to the spies. Heb. 11:31
She is also in the line of Messiah. She was the mother of Boaz, the man of responsibilities, the man of Israel who knew God’s Law of Redemption.
. . . and Salmon the father of Boaz by Rahab, and Boaz the father of Obed by Ruth, and Obed the father of Jesse, Matt. 1:5
Maybe it was because of his mother faith, or maybe because his mother had been a pagan what ever the reason, he redeemed Ruth a pagan Moabite.