“Likewise also was not Rahab the harlot justified by works, when she had received the messengers, and had sent them out another way?”
King James Version (KJV)
2:25 After Abraham, the father of the Jews, the apostle cites Rahab, a woman, and a sinner of the gentiles; to show, that in every nation and sex true faith produces works, and is perfected by them; that is, by the grace of God working in the believer, while he is showing his faith by his works.
Jas 2:25 Likewise also, was not Rahab the harlot justified by works? See PNT "Heb 11:31". This is one of the long roll of examples of faith shown by works given by Paul.