From Pope St. John Paul II’s encyclical Veritatis Splendor (1993):
Faith also possesses a moral content. It gives rise to and calls for a consistent life commitment; it entails and brings to perfection the acceptance and observance of God’s commandments. As Saint John writes, “God is light and in him is no darkness at all. If we say we have fellowship with him while we walk in darkness, we lie and do not live according to the truth . . . And by this we may be sure that we know him, if we keep his commandments. He who says ‘I know him’ but disobeys his commandments is a liar, and the truth is not in him; but whoever keeps his word, in him truly love for God is perfected. By this we may be sure that we are in him: he who says he abides in him ought to walk in the same way in which he walked” (1 Jn 1:5-6; 2:3-6).
Through the moral life, faith becomes “confession”, not only before God but also before men: it becomes witness. “You are the light of the world”, said Jesus; “a city set on a hill cannot be hid. Nor do men light a lamp and put it under a bushel, but on a stand, and it gives light to all in the house. Let your light so shine before men, that they may see your good works and give glory to your Father who is in heaven” (Mt 5:14-16). These works are above all those of charity (cf. Mt 25:31-46) and of the authentic freedom which is manifested and lived in the gift of self, even to the total gift of self, like that of Jesus, who on the Cross “loved the Church and gave himself up for her” (Eph 5:25). Christ’s witness is the source, model and means for the witness of his disciples, who are called to walk on the same road: “If any man would come after me, let him deny himself and take up his cross daily and follow me” (Lk 9:23). Charity, in conformity with the radical demands of the Gospel, can lead the believer to the supreme witness of martyrdom. Once again this means imitating Jesus who died on the Cross: “Be imitators of God, as beloved children”, Paul writes to the Christians of Ephesus, “and walk in love, as Christ loved us and gave himself up for us, a fragrant offering and sacrifice to God” (Eph 5:1-2).
— Veritatis Splendor 89