The letter of Apostle Paul to Romans says that we're justified by faith alone not by works but then in the book of Revelation Jesus we'll be rewarded according to what we've done (22:12). So in what God will judge the world faith or work??
Likewise Revelation 20:12:
And the dead were judged by what was written in the books, by what they had done (RSV)
Taking canonical Scripture as a coherent whole, the teaching that one will be judged by his or her works (ἔργα) is quite clear. This is borne out, in addition to the verse you cite, in:
He will render to every man according to his works
Thou dost requite a man according to his work.
For according to the work of a man he will require him.
Then there is also, of course, the account of the judgment of the nations in the Gospel according to Matthew (25:31-46).
Romans 3:28 states that we are justified by faith without the works of the law, not without any works whatsoever. This is attested to by James (2:14):
What does it profit, my brethren, if a man says he has faith but has not works? Can his faith save him?
Romans 5:1 states Since we are justified by faith, we have peace with God through our Lord Jesus Christ. Some interpret justification as an act of being made permanently righteous, perhaps once and for all. But elsewhere in Scripture (including in another part of Romans) it is clear that justification by faith is an ongoing process and not some one time event.
This should be understood in light of the same Book's use of the terminology and phraseology:
Revelation 2:23 (DRB)—The Unrepentant False Prophetess
And I will kill her children with death, and all the churches shall know that I am he that searcheth the [minds] and hearts, and I will give to every one of you according to your works.
This is itself a reference to what He says in Jeremiah 17:10:
I the Lord try the hearts, and [examine] the [minds], to give to every one according to his ways, and according to the fruits of his devices.
Clearly, God judging this false prophet because of her luring His people into the committing of sins is what is meant by 'then they shall know that ... I will give to everyone according to your deeds.'
As for St. Paul or the rest of the New Testament, they nowhere teach that works are somehow irreleveant since the unveiling of the true Faith. They merely show how a works-centered approach which forgets the faith which makes it valuable or meaningful to God is what is needed first and foremost. In that sense, the works which necessarily "work together" (Jas 2:22) with one's faith are secondary, and therefore are not able to save or justify anyone. Just as bricks are unable to keep you warm if not placed in order and with care in a foundation.
But "faith, working out through love, [this is what counts]" (Gal 5:6). On top of this, "works of the law" in context refer to the Mosaic laws, such as circumcision, not the commandments: "Circumcision matters nothing, and uncircumcision matters nothing: but the observance of the commandments of God, [this matters]." (1 Cor 7:19).
Revelation 2:5 (DRB)
Be mindful therefore from whence thou art fallen: and [repent], and do [your former] works. Or else I come to thee, and will move thy candlestick out of its place, except thou do [repent].
First let us bring grace its place: First there is nothing we could ever do to merit salvation. We were sold to sin and slaves under the Lord of sin, the law wrought no deliverance but Grace made a way to deliver and set free the believer.
This is the condition I was in before Grace delivered me:
14 For we know that the law is spiritual: but I am carnal, sold under sin.
15 For that which I do I allow not: for what I would, that do I not; but what I hate, that do I.
16 If then I do that which I would not, I consent unto the law that it is good.
17 Now then it is no more I that do it, but sin that dwelleth in me.
18 For I know that in me (that is, in my flesh,) dwelleth no good thing: for to will is present with me; but how to perform that which is good I find not.
19 For the good that I would I do not: but the evil which I would not, that I do.
20 Now if I do that I would not, it is no more I that do it, but sin that dwelleth in me.
21 I find then a law, that, when I would do good, evil is present with me.
22 For I delight in the law of God after the inward man:
23 But I see another law in my members, warring against the law of my mind, and bringing me into captivity to the law of sin which is in my members.
My condition changed after Grace delivered me, set me free.
5 For when we were in the flesh, the motions of sins, which were by the law, did work in our members to bring forth fruit unto death.
6 But now we are delivered from the law, that being dead wherein we were held; that we should serve in newness of spirit, and not in the oldness of the letter.
31 Then said Jesus to those Jews which believed on him, If ye continue in my word, then are ye my disciples indeed;
32 And ye shall know the truth, and the truth shall make you free.
33 They answered him, We be Abraham's seed, and were never in bondage to any man: how sayest thou, Ye shall be made free?
34 Jesus answered them, Verily, verily, I say unto you, Whosoever committeth sin is the servant of sin.
35 And the servant abideth not in the house for ever: but the Son abideth ever.
36 If the Son therefore shall make you free, ye shall be free indeed.
Grace set me free from sin.to serve in the newness of the spirit.
1 There is therefore now no condemnation to them which are in Christ Jesus, who walk not after the flesh, but after the Spirit.
2 For the law of the Spirit of life in Christ Jesus hath made me free from the law of sin and death.
3 For what the law could not do, in that it was weak through the flesh, God sending his own Son in the likeness of sinful flesh, and for sin, condemned sin in the flesh:
4 That the righteousness of the law might be fulfilled in us, who walk not after the flesh, but after the Spirit.
5 For they that are after the flesh do mind the things of the flesh; but they that are after the Spirit the things of the Spirit.
Grace set me liberty to serve God in Spirit and truth. Now that I am under Grace, Grace teaches me to walk in the will of God.
11 For the grace of God that bringeth salvation hath appeared to all men,
12 Teaching us that, denying ungodliness and worldly lusts, we should live soberly, righteously, and godly, in this present world;
Grace quickened me from the dead, changed my innermost being to make me serve God in truth. Grace brought into a special relationship to Christ.
1 And you hath he quickened, who were dead in trespasses and sins:
2 Wherein in time past ye walked according to the course of this world, according to the prince of the power of the air, the spirit that now worketh in the children of disobedience:
3 Among whom also we all had our conversation in times past in the lusts of our flesh, fulfilling the desires of the flesh and of the mind; and were by nature the children of wrath, even as others.
4 But God, who is rich in mercy, for his great love wherewith he loved us,
**5 Even when we were dead in sins, hath quickened us together with Christ, (by grace ye are saved;) ** 6 And hath raised us up together, and made us sit together in heavenly places in Christ Jesus:
8 For by grace are ye saved through faith; and that not of yourselves: it is the gift of God:
9 Not of works, lest any man should boast.
> 10 For we are his workmanship, created in Christ Jesus unto good works, which God hath before ordained that we should walk in them.
Grace circumcised me by the cirumcicion of Christ that I may walk in the Love of God and do the works of God.
11 In whom also ye are circumcised with the circumcision made without hands, in putting off the body of the sins of the flesh by the circumcision of Christ:
12 Buried with him in baptism, wherein also ye are risen with him through the faith of the operation of God, who hath raised him from the dead.
13 And you, being dead in your sins and the uncircumcision of your flesh, hath he quickened together with him, having forgiven you all trespasses;
14 Blotting out the handwriting of ordinances that was against us, which was contrary to us, and took it out of the way, nailing it to his cross;
6 And the LORD thy God will circumcise thine heart, and the heart of thy seed, to love the LORD thy God with all thine heart, and with all thy soul, that thou mayest live.
28 Then said they unto him, What shall we do, that we might work the works of God?
29 Jesus answered and said unto them, This is the work of God, that ye believe on him whom he hath sent.
12 Verily, verily, I say unto you, He that believeth on me, the works that I do shall he do also; and greater works than these shall he do; because I go unto my Father.
The transforming power of Grace brought the life of Jesus Christ in us by which life we are made new creatures.
20 I am crucified with Christ: nevertheless I live; yet not I, but Christ liveth in me: and the life which I now live in the flesh I live by the faith of the Son of God, who loved me, and gave himself for me.
21 I do not frustrate the grace of God: for if righteousness come by the law, then Christ is dead in vain.
When we truly believe the power of Grace takes its full effect on us and this brings God to dwell in us and God in us is identified by his Characteristics. Only in grace do we become part of the good tree that bears good fruit. Our works identify whether we have truly received the Grace of God or not because not everyone who says Lord, Lord shall enter into the kingdom of heaven. Grace now teaches us this:
15 Beware of false prophets, which come to you in sheep's clothing, but inwardly they are ravening wolves.
16 Ye shall know them by their fruits. Do men gather grapes of thorns, or figs of thistles?
17 Even so every good tree bringeth forth good fruit; but a corrupt tree bringeth forth evil fruit.
18 A good tree cannot bring forth evil fruit, neither can a corrupt tree bring forth good fruit.
19 Every tree that bringeth not forth good fruit is hewn down, and cast into the fire.
20 Wherefore by their fruits ye shall know them.
21 Not every one that saith unto me, Lord, Lord, shall enter into the kingdom of heaven; but he that doeth the will of my Father which is in heaven.
22 Many will say to me in that day, Lord, Lord, have we not prophesied in thy name? and in thy name have cast out devils? and in thy name done many wonderful works?
23 And then will I profess unto them, I never knew you: depart from me, ye that work iniquity.
24 Therefore whosoever heareth these sayings of mine, and doeth them, I will liken him unto a wise man, which built his house upon a rock:
25 And the rain descended, and the floods came, and the winds blew, and beat upon that house; and it fell not: for it was founded upon a rock.
26 And every one that heareth these sayings of mine, and doeth them not, shall be likened unto a foolish man, which built his house upon the sand:
27 And the rain descended, and the floods came, and the winds blew, and beat upon that house; and it fell: and great was the fall of it.
There is no short cut. The whole new testament is the sum total of Grace.
The specific verse you mention in the question does not exactly convey a judgment of a persons works. It only mentions people will receive what they deserve. Since it part of the victory celebration at the end of the book one might even suggest that the key word misthos could be rendered as reward. I am personally thankful that my reward will come by grace through His works and not my own, because mine are filthy rags. You would have to look elsewhere to determine how the Bible establishes salvation versus judgment.
I make a distinction between the kinds and places of judgment within the overall structure of eschatology--a study of last things. The answer to this questions depends a great deal upon the theological perspective you bring to the text. I hold to a literal hermeneutic (I.E. a dispensational hermeneutic).
Briefly or not so briefly, depending on your outlook:
Those who are saved and are members of the Church will be raptured, prior to the start of the tribulation. At that time, the Church will receive their glorified bodies and they will appear at the judgment seat of Christ. That phrase, the judgment seat of Christ, was intended by Paul to convey the raised seat of the Caesar at the Roman games. It was not a court room judgment, it is in many respects a celebration of the victory won, just as the Caesar would celebrate a great gladiator's victory. Works are never added to this picture because they are a celebration of the victory Jesus has won on our behalf. At the judgment seat of Christ what we have done in the flesh will be made apparent, but everyone at that scene is already saved (Rev. 4-5).
There is the sheep and goat judgment at the end of the tribulation, which is found in Matthew 25. Here is where the Old Testament saints receive their resurrection body (Daniel 12 and Isa. 26). This is judgment of those who are alive at the end of the seven year tribulation. The goats are cast into the lake of fire because they rejected Jesus as the Messiah, and the sheep enter into the millennium.
The great white throne judgment at the end of the millennium is only for the lost (Rev 20). This is the only time when people will be judged according to their works and it is to establish beyond any doubt that they are worthy of judgment.
I would contend that there are no places where believers are judged, involving the saved, where the idea of works enters in as the basis of God's judgment. This implies that I do not hold to general judgment at the end as do many other theological frameworks like Covenant theology.