If, in fact, Abraham was justified by works, he had something to boast about - but not before God. What does the Scripture say? "Abraham believed God, and it was credited to him as righteousness."
Now when a man works, his wages are not credited to him as a gift, but as an obligation. However, to the man who does not work but trusts God who justifies the wicked, his faith is credited as righteousness.
(Romans 4:2-5 NIV)
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. 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.
(James 2:20-24 NIV)
Verses like this stress Christians. After all, here's two apostles making apparently contradictory views of salvation. Paul says we're saved by faith - deeds are useless. James says faith is useless without deeds. So which is it?
Paul and James believed the same gospel and shared largely the same theology (Galatians 2:7-10) which means we need to better understand each author's viewpoint.
Look at the book of Romans. Paul constantly refers to the "circumcision" and "uncircumcision" or the "Law" (the Law of Moses). That is, he is speaking mostly from a Jewish context. So, when Paul talks about how works don't save us in Romans Ch. 4, he's referring to obeying the Law of Moses - the 613 laws God handed down on Mt. Sinai. Paul refers to this law in Romans 3:20 by saying "through the law we become conscious of sin".
James, on the other hand, focuses on how a Christian ought to behave and the only law he refers to is a "law of liberty" or a "law that gives freedom" (James 1:25, 2:12)
But is Paul's law that makes us aware of our sinfulness the same law that James calls the "law of liberty"?
Since James and Paul believed the same things about salvation, we must assume that they were either referring to two different laws, or to the same law, but in two completely different contexts.
A key to solving the riddle can be found in the book of Ezekiel:
I will spinkle clean water on you, and you will be clean; ... I will remove from you your heart of stone and give you a heart of flesh. And I will put my Spirit in you and move you to follow my decrees and be careful to keep my laws.
The key actions in Ezekiel 36 are performed by God: I will sprinkle / remove / put / move... which makes the salvation process pretty much entirely God's job - not man's. Therefore, Paul's idea that works are useless to earn God's favor is absolutely right.
However, that doesn't mean a saved person is free from the law - note that in the second part God says, "I will ... move you to follow my decrees and ... keep my laws." In other words, works still matter, but not until after salvation.
The engineer in me finds it useful to talk about these ideas with some simple equations (I'm grateful to my friend, Ron, who supplied me with them):
According to Paul: Faith = Salvation
According to James: Faith + Works = Salvation
According to God: Faith = Salvation + Works
In other words, while it is faith alone that saves an individual, good works / obedience to God's will is a side-effect of salvation. Without good works, there's little reason to think a "Christian" really is saved. Paul was saying that works do not contribute to salvation. James was saying that works are a natural effect of being saved - there's no such thing as a "non-practicing" Christian.
Paul mirrors Ezekiel 36 in Ephesians 2:8-10:
For it is by grace you have been saved, through faith ... not by works, so that no one can boast. For we are God's workmanship, created in Christ Jesus to do good works, which God prepared in advance for us to do.