James 2:18-24
18 But someone will say, “You have faith; I have deeds.”
Show me your faith without deeds, and I will show you my faith by my deeds.
19 You believe that there is one God. Good! Even the demons believe that—and shudder.
20 You foolish person, do you want evidence that faith without deeds is useless? 21 Was not our father Abraham considered righteous for what he did when he offered his son Isaac on the altar? 22 You see that his faith and his actions were working together, and his faith was made complete by what he did. 23 And the scripture was fulfilled that says, “Abraham believed God, and it was credited to him as righteousness,” and he was called God’s friend. 24 You see that a person is considered righteous by what they do and not by faith alone.
I have read this passage many times throughout the years, plus heard it used as an argument for works in relationship to salvation. The Bible clearly teaches that our salvation is through Christ's work alone, all of our works are as filthy rags in that regard and that's not what James is talking about here. Here he is talking about works that come out of a genuine faith in God and today it really hit me for the first time why he used the examples of Abraham & Isaac, and Rahab when talking about this. The passage became so clear!

To use this passage to justify works or to miss the great faith connection is to miss the most important part of James' message - faith, trust, and obedience to God Almighty will result in works, works that we cannot do in our own strength. No one would be able to do this type of work without complete faith in God. This kind of faith will lead to doing the work that God wants done and is calling us personally to do. It is not a one-size-fits-all, but it will all bring honor and glory to God.
James 2:25&26
25 In the same way, was not even Rahab the prostitute considered righteous for what she did when she gave lodging to the spies and sent them off in a different direction? 26 As the body without the spirit is dead, so faith without deeds is dead.
Then we have Rahab's story. Her "works" could have easily cost her life. She disobeyed the King, lying in order to protect the spies because she believed the Israelite's God was "indeed God in heaven above and on earth below." She feared God more than man. She acted out of her faith in the one true God - believing that He alone could protect her and her family, but she also was not frozen with fear. She acted on her faith.
In both cases, the works came out of a very strong faith, trust, and obedience to God Almighty. Faith produces the works of God. Otherwise faith is dead and works are just works.