Jas 2:23 And the scripture was fulfilled which saith, Abraham believed God, and it was imputed unto him for righteousness: and he was called the Friend of God.
Jas 2:24 Ye see then how that by works a man is justified, and not by faith only.
At first glance this verse seems directly opposed to Romans 3:28; "Therefore we conclude that a man is justified by faith without the deeds of the law."
However, we realize that Paul is speaking of legal works that precede salvation, and they cannot be made a ground and basis for salvation.
James is always thinking of works produced by one trusting and obeying Christ””being born again ... a necessary consequence and outworking of REAL faith.
Abraham's faith made him willing to offer his son on the altar.
Rahab's faith, as we read in the next verse, made her willing to hide the spies””forsaking her own land and people.
"Ye see then how ..." James is saying, as it were, "Does not this illustration of Abraham's faith producing works prove to you that a man is justified by works and not by faith only?"
He is appealing to man's own reasoning powers.
Declared righteous
Young's Literal Translation of this verse: "Ye see then, that out of works is a man declared righteous, and not out of faith only." You will notice it says "declared righteous," not "made righteous." A man is righteous in God's sight when he trusts in and obeys the Lord, and is born again. God does not need to see the fruit of faith to know there is faith (like the thief on the cross), but we do and you do too! That is why the Scriptures tell us the following:
2Co_13:5 Examine yourselves, whether ye be in the faith; prove your own selves. Know ye not your own selves, how that Jesus Christ is in you, except ye be reprobates?
We cannot declare one righteous until we see the fruit of his faith. (Just like you declare Abraham is righteous. You see the fruit of his faith). We can only tell one is a Christian by what he does. So James is not contradicting Paul, but complementing him.
Paul is fearful of dead works without a living faith.
James is fearful of a dead faith that produces no good works.
If no works are produced, faith is a mere dead thing, good for nothing. One who produces no good works proves he has not received the Lord Jesus and obeyed Him, and should not be declared righteous by man.