This question is not critical only today, but it was in the eye of the storm we call the Protestant Reformation that swept through and divided the Christian church in the sixteenth century. Martin Luther declared his position: Justification is by faith alone, our works add nothing to our justification whatsoever, and we have no merit to offer God that in any way enhances our justification. This created the worst schism in the history of Christendom.
In refusing to accept Luther's view, the Roman Catholic Church excommunicated him, then responded to the outbreak of the Protestant movement with a major church council, the Council of Trent, which was part of the so-called Counter-Reformation and took place in the middle of the sixteenth century. The sixth session of Trent, at which the canons and decrees on justification and faith were spelled out, specifically appealed to James 2:24 to rebuke the Protestants who said that they were justified by faith alone: "You see that a person is justified by what he does and not by faith alone." How could James say it any more clearly? It would seem that that text would blow Luther out of the water forever.
Of course, Martin Luther was very much aware that this verse was in the book of James. Luther was reading Romans, where Paul makes it very clear that it's not through the works of the law that any man is justified and that we are justified by faith and only through faith. What do we have here? Some scholars say we have an irreconcilable conflict between Paul and James, that James was written after Paul, and James tried to correct Paul. Others say that Paul wrote Romans after James and he was trying to correct James.
I'm convinced that we don't really have a conflict here. What James is saying is this: If a person says he has faith, but he gives no outward evidence of that faith through righteous works, his faith will not justify him. Martin Luther, John Calvin, or John Knox would absolutely agree with James. We are not saved by a profession of faith or by a claim to faith. That faith has to be genuine before the merit of Christ will be imputed to anybody. You can't just say you have faith. True faith will absolutely and necessarily yield the fruits of obedience and the works of righteousness. Luther was saying that those works don't add to that person's justification at the judgment seat of God. But they do justify his claim to faith before the eyes of man. James is saying, not that a man is justified before God by his works, but that his claim to faith is shown to be genuine as he demonstrates the evidence of that claim of faith through his works.