"You believe that there is one God. Good! Even the demons believe that - and shudder." NIV translation
There is much talk of faith these days and even the fact that there is one God is widely accepted. James tells us that even the demons believe that but real saving faith is a faith in Christ Jesus as the payment for our sins.
"You foolish man, do you want evidence that faith without deeds is useless? Was not our ancestor Abraham considered righteous for what he did when he offered his son Isaac on the altar? You see that his faith and his actions were working together, and his faith was made complete by what he did." NIV translation
When James is talking about "useless" faith he is talking about faith that is dead and by that he means faith that is not being put to use. It is like having a thoroughbred race horse but never taking it out of the barn to race. Even though it is not taken out of the barn, it is still a racehorse but it is not the runner that God made it to be. The same is true with faith in that many have faith in Jesus for salvation but they leave it in the barn.
They do not realize the blessing of taking it out and putting it to work which will strengthen and help the believer to grow closer to God. James uses the example of Abraham and Isaac to demonstrate how faith and action go hand in hand.
"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. You see that a person is justified by what he does and not by faith alone." NIV translation
The scripture quoted here is from Genesis 15:6 and refers to the fact that God told Abram that his children would be as numerous as the stars in the sky and, even though he was an old man, he believed God. Justification is a legal term where an accused person is declared to be not guilty. James is talking about the fact that we are declared not guilty of sin because of our faith in Jesus Christ but he is also saying that, if we have faith in Jesus, there will be outward demonstration of it (works). You can think of your walk as an apple tree where faith in Jesus is the roots which nourish the tree. An apple tree when fed by the roots will produce fruit because that is what God created it to do. The same thing is true of a Christian in that, if we have a saving faith, we will produce fruit.
"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? As the body without the spirit is dead, so faith without deeds is dead." NIV translation
Now, James gives us the second example of faith in action and the reason is that, with God, all matters are to be settled by two witnesses (two is the number of witnessing throughout the Bible). Here, he uses the example of Rahab the prostitute from Joshua chapter two. Then, James ends his teaching with the example of the human body and death.