You see that a person is justified by works and not by faith alone. (ESV)
When I was a kid there was a man who used to stop by the house every now and again named Had. Yes, that was his name. Had would make me a promise every time he came to the house. He promised he was going to bring me ice cream the next time he came to the house. Time after time Had would come to the house. Never was there any ice cream.
This is more than a story about a boy disappointed in what he never had (pun intended). The reality is that if Had wanted to be known as a genuine giver of ice cream he would have had to produce some! Preferably he would have produced some mint chocolate chop ice cream, but even vanilla would have justified his claim that he was going to give me ice cream.
Had was a fraud. James is also saying that anyone who claims to have genuine faith must demonstrate it by works. It justifies their claim. There are many people who claim to know the Lord, but their works, or lack of works, proves otherwise. They have no love for the savior. They do not obey what God's Word says. They do not do the works that prove their faith is real.
If we desire to belong to God we have to place our faith in him. That faith that we place in God is a gift from God. If we have truly received faith that is from God (remember that he is the author and the finisher of our faith (Hebrews 12:2) then it will be accompanied by works. Those works do not save us, but they do give evidence of our salvation.
Is your claim to faith a fraud? Someone once said, "If you were on trial for being a Christian would there be enough evidence to convict you?" Search your heart today to see if your faith is genuine.