Many people argue that the book of Romans and the book of James disagree on the subject of faith. Paul writes that justification is by faith alone, yet James teaches that faith without works is dead. How do we reconcile these two teachings?
First of all, we must understand that Paul is discussing the beginning of one's spiritual life when he says, "And to the one who does not work but trusts him who justifies the ungodly, his faith is counted as righteousness" in Romans 4:5. Paul is obviously stating that we cannot earn God's favor; through Christ, God must justify the ungodly if he will justify anyone.
But Paul does not stop writing with this statement. He goes on to discuss Abraham's circumcision. "Abraham believed God, and it was counted to him as righteousness." When was Abraham circumcised? He was circumcised years after God justified him. His circumcision was evidence of his faith in God, not the basis. Romans 4:11 tells us that his circumcision was the sign and the seal of his faith, not the grounds.
Rather than contradicting James, I believe this passage is in harmony with James 2:17 which says, "So also faith by itself, if it does not have works, is dead." Abraham was challenged to put his money where his mouth was in Genesis 17; "Every male among you shall be circumcised." While Abraham's faith alone was the grounds for his justification back in Genesis 15, Abraham's faith in God must have been working when he performed the first circumcision upon himself!