This is something I commented on recently:
There is no contradiction in what Paul and James are saying. Paul makes it clear that faith is a gift to us from God. James makes it clear that a person who is not doing good works does not have faith. Good works are a natural outgrowth of living in Jesus Christ because with Him directing our lives we cannot avoid exhibiting good works which He does through us. Our faith makes Him LORD of our life, then He begins doing good works through us precisely because He is genuinely living in us.
So, without faith there will be no selfless good works (think Christian women held prisoner by the Taliban, as opposed to giving to Charity because it benefits us in the form of a tax write off), but a person with faith will always exhibit selfless good works -- as in James' orphans and widows, two groups that will not benefit someone to care for [Jam 1:27] ie. Muslim women and children in Afghanistan under oppressive Talibanic rule.