According to the grace of God which was given to me, as a wise master builder I have laid the foundation, and another builds on it. But let each one take heed how he builds on it. For no other foundation can anyone lay than that which is laid, which is Jesus Christ. Now if anyone builds on this foundation with gold, silver, precious stones, wood, hay, straw, each one’s work will become clear; for the Day will declare it, because it will be revealed by fire; and the fire will test each one’s work, of what sort it is. If anyone’s work which he has built on it endures, he will receive a reward. If anyone’s work is burned, he will suffer loss; but he himself will be saved, yet so as through fire." (1 Corinthians 3:10-15, emphasis added)
Paul tells his audience at Corinth that he was but a servant of God. It was His grace that worked through the apostle to bring about the conversion of people to Christianity at that city. Members of the church needed to focus their admiration on God rather than man. Paul was as an instrument being played at an orchestra. God used the apostles to grow His church. Compare the language of a master builder in verse ten to Proverbs 8:30.
The reference to "the Day" is to the Day of Judgment. Compare with 1 Thessalonians 5:2-9. The "fire" reveals the truth as to the state of our lives and doctrine while alive on this earth. If the Christian's work withstands this testing, then he or she will receive praise from God (v. 14). Jesus Christ is the foundation of our salvation. Our good works are built on Him.
God will evaluate the quality of every man's work. He will inspect both our actions and the motives behind those actions. Charity done with selfish ambitions in mind will not be accepted by Him. Paul's mentioning of gold, silver, precious stones, wood, hay, and straw corresponds to the quality of our works done in service to God.
If a person's works fail to pass the testing of fire, then he or she will still be saved. The Christian is saved in both scenarios, whether his or her works pass the testing of fire or not. Thus, it is clear from the text of 1 Corinthians 3:10-15 that justification is not determined on the basis of good works (compare with Romans 4:4-5 which says justification is not an earned wage, but a free gift from God). This person will be shown mercy but is taking foolish risks with God.