It was this serious error that James examined in these verses. Here James described someone who claims to have faith when, in reality, that claim is empty. It is worthless because faith without good deeds to follow up has no value. In this life, such a dormant faith is hypocritical and self-deluding. In the next life, it will not bring salvation from God's wrath.
Fruitless faith is worthless.
However, James should not be accused of denying salvation by faith alone. James illustrated his point with a simple story. A church member was starving from lack of food and cold because he had no clothing. Another member, well aware of the need, responded to the person with a heartfelt wish for his prosperity, but not with anything tangible. He wished God's peace and wholeness upon his fellow Israelite with the expression for shalom in the first-century Jewish church.