Jos 6:17,25, Jame 2:25, Mt 1:5-6
In the Old Testament, Rahab heard what God had done for the people of Israel and believed in the God of Israel as the true God. So Rahab hid the Israeli spies who had come to spy out Jericho. (Jos 2:11,21, James 2:25)
Jos 2:11 And as soon as we had heard these things, our hearts did melt, neither did there remain any more courage in any man, because of you: for the Lord your God, he is God in heaven above, and in earth beneath. 21 And she said, According unto your words, so be it. And she sent them away, and they departed: and she bound the scarlet line in the window.
James 2:25 Likewise also was not Rahab the harlot justified by works, when she had received the messengers, and had sent them out another way?
The Israelites who conquered Jericho saved Rahab and her family. (Jos 6:19,25)
Jos 6:19 But all the silver, and gold, and vessels of brass and iron, are consecrated unto the Lord: they shall come into the treasury of the Lord. 25 And Joshua saved Rahab the harlot alive, and her father's household, and all that she had; and she dwelleth in Israel even unto this day; because she hid the messengers, which Joshua sent to spy out Jericho.
As a descendant of Rahab, Jesus, the Christ, came. (Mt 1:5-6)
Mt 1:5 And Salmon begat Booz of Rachab; and Booz begat Obed of Ruth; and Obed begat Jesse; 6 And Jesse begat David the king; and David the king begat Solomon of her that had been the wife of Urias;