St. James actually teaches the imprecise lesson. We are saved by faith and works, “so to speak”. Because they are necessary prerequisites.
I think we all agree that “faith” is a necessary prerequisite, do we not?
Hebrews 11:6But without faith it is impossible to please him: for he that cometh to God must believe that he is, and that he is a rewarder of them that diligently seek him.
And works are also a necessary prerequisite. St. John says:
Every branch in me that beareth not fruit he taketh away:….
Does that mean then, that we work our way to heaven? By no means.
Does it mean that we cleanse our own souls of sins? No way.
Here is what the Catholic Church officially says:
HOW THE GRATUITOUS JUSTIFICATION OF THE SINNER BY FAITH IS TO BE UNDERSTOOD
But when the Apostle says that man is justified by faith and freely, these words are to be understood in that sense in which the uninterrupted unanimity of the Catholic Church has held and expressed them, namely, that we are therefore said to be justified by faith, because faith is the beginning of human salvation, the foundation and root of all justification, without which it is impossible to please God and to come to the fellowship of His sons;
and we are therefore said to be justified gratuitously, because none of those things that precede justification, whether faith or works, merit the grace of justification.
For, if by grace, it is not now by works, otherwise, as the Apostle says, grace is no more grace.
For not the hearers of the law are just before God, but the doers of the law shall be justified.
The only thing he needs to add to that to be absolutely precise are the words, “by God”. It would then read:
For not the hearers of the law are just before God, but the doers of the law shall be justified by God.
Here’s the rest of the Catholic Teaching from Trent:
IN WHAT THE JUSTIFICATION OF THE SINNER CONSISTS, AND WHAT ARE ITS CAUSES
This disposition or preparation is followed by justification itself, which is not only a remission of sins but also the sanctification and renewal of the inward man through the voluntary reception of the grace and gifts whereby an unjust man becomes just and from being an enemy becomes a friend, that he may be an heir according to hope of life everlasting.
The causes of this justification are:
the final cause is the glory of God and of Christ and life everlasting; the efficient cause is the merciful God who washes and sanctifies gratuitously, signing and anointing with the holy Spirit of promise, who is the pledge of our inheritance, the meritorious cause is His most beloved only begotten, our Lord Jesus Christ, who, when we were enemies, for the exceeding charity wherewith he loved us, merited for us justification by His most holy passion on the wood of the cross and made satisfaction for us to God the Father, the instrumental cause is the sacrament of baptism, which is the sacrament of faith, without which no man was ever justified finally, the single formal cause is the justice of God, not that by which He Himself is just, but that by which He makes us just, that, namely, with which we being endowed by Him, are renewed in the spirit of our mind, and not only are we reputed but we are truly called and are just, receiving justice within us, each one according to his own measure, which the Holy Ghost distributes to everyone as He wills, and according to each one’s disposition and cooperation.
Again, please note the bold italics.