The mistake you are making is taking James alone and not using the rest of the Scriptures to validate your point. After all James was not the only one who wrote about justification. Paul did and so did Peter. Focus on only 1 Bible verse is not exegesis.
I am not taking James' letter alone, it is part of the whole revelation given by God both in holy scripture and especially in the person of Jesus Christ. Jesus said
if you love me you will keep my commandments and Jehovah said
to obey is better than sacrifice as well as
[Jehovah] has told you, O man, what is good and what the Lord requires of you, but to do justice, and to love mercy, and to walk humbly with your God of course James' letter also points out that
faith without works is dead so we have the testimony of the Lord Jesus Christ, and the Father through the prophets, and the apostles through James, Peter, and Paul all teaching the same thing; specifically that
a man is justified by works and not by faith alone. What is written in James' letter does not teach that works earn justification nor that works that are not good play any role in justification instead he teaches that faith cannot justify anybody unless and until it is alive with good works pleasing to God. But James is not the only one who teaches that, Paul too teaches it when he discusses justification and when Paul writes that a man is
justified by faith apart from works the kind of faith he is talking about is faith that is active in love which is to say
faith working in love which is the same kind of
living faith that James wrote about. And the kind of works Paul is talking about are works done apart from faith - such as the works that the Pharisees who opposed Jesus' teaching did , things like tithing of mint, dill, cumin and boating of keeping the Law of Moses while at the same time they were busy being self righteous hypocrites. So the ones who take the letter of James by itself, as if it were some kind of outlier in the scriptures a "
verse alone" as was written in another post by another contributor to this thread, are the people who keep dismissing what James' letter says as if it were somehow out of kilter with the teaching of Jesus and the apostles and the prophets and the law. It isn't out of kilter of course. It is mainstream biblical teaching and anybody who lives by faith acting in love knows this is so.