James uses Rahab as an example of faith.  She was an inn keeper. Her story is told in Joshua 2:1-24.  She believed that the Israelites would be successful in their conquest of the land.  When two spies came to her for lodging, she hid them and then enabled them to escape.  By this work she and her extended family were saved.  And we know that she became a part of Messiah’s bloodline, and a great example of works that justified (set her right) with God’s plan for His people. For Rahab, her works were an expression of her faith.  It must be true for us as well.

”And in the same way was not also Rahab the prostitute justified by works when she received the messengers and sent them out by another way? For as the body apart from the spirit is dead, so also faith apart from works is dead” (James 2:25–26 ESV).