“Justification by faith alone” is a Lutheranism. You don’t find that in the Bible. Indeed, Luther added the word “alone” into his translation of the Bible. When he was challenged on this, he replied, “It MEANS ‘faith alone’ so I translated it that way! Therefore I have a right to add ‘alone’ if I want to!”
James clearly wrote that justification is by works, with faith being active along with works. Interestingly he used the same OT passage as his basis, that Paul used Romans 4:1-5. Commentators go through all sorts of gymnastics to try to prove that there is no contradiction between Paul and James. I haven’t been convinced that they have been successful.
In my opinion, Paul was not writing about justification not being by works per se, but not being by the works of the Mosaic law, whereas James was writing about justification by works of righteousness.
Here are James’ words:
*So faith by itself, if it has no works, is dead. But some one will say, “You have faith and I have works.” Show me your faith apart from your works, and I by my works will show you my faith.
You believe that God is one; you do well. Even the demons believe—and shudder.
Do you want to be shown, you shallow man, that faith apart from works is barren? Was not Abraham our father justified by works, when he offered his son Isaac upon the altar? You see that faith was active along with his works, and faith was completed by works, and the scripture was fulfilled which says, “Abraham believed God, and it was reckoned to him into (εις) righteousness” [righteousness being the result of faith]; and he was called the friend of God.
You see that a man is justified by works and not by faith alone. (James 2:17-24)*
Even the word “justification” in today’s Protestant and evangelical world is often misunderstood. Many think it means “being counted righteous” whether you are actually righteous or not. In the New Testament the word frequently means “being rendered righteous”, that is, becoming actually righteous.