No works, no matter how benevolent or altruistic, will earn you a place in heaven. In order to inherit eternal life one must be justified with the Father. To be justified with God means that God looks at us as if we had never sinned. Justification removes our sinful condition and restores our perfect relationship with God. However, good works are of paramount importance.
Good works are a natural outgrowth of faith.
He exhorted the believers to practice good works. The first judgment is based upon faith and faith alone. Good works are not for the forgiveness of sins, grace, or justification. We obtain these through faith in Jesus Christ. If you have faith in Jesus Christ you are saved.