Then I shall not be ashamed when I look upon all Your commandments.
Psalm 119:6

We must reflect on the previous verses in order to understand the psalmist’s confidence in this verse.

The psalmist understands the importance of striving to live a life that is blameless. He has determined to walk in the law of the Lord (vs. 1). In order to walk in a way that pleases the Lord, he must observe God’s testimonies (vs.2). His obedience must not be a forced obedience, but a loving obedience (vs. 2). The contrast in the psalmist life is reflected in putting off unrighteousness and walking in righteousness (vs. 3). The psalmist is whole-hearted in his commitment to keep the word (vs. 4, 5).

Now the psalmist does not have to be ashamed when he reads the Scriptures. His knowledge of the truth has been translated into obedience. It is accomplishing the purpose that God intended.

It is shameful and dishonoring to God when we know what God desires from us and yet we live disregarding what He says. This is contrary to what it means to be a Christian.

Jesus answered and said to him, “If anyone loves Me, he will keep My word; and My Father will love him, and We will come to him and make Our abode with him. He who does not love Me does not keep My words; and the word which you hear is not Mine, but the Father’s who sent Me.”
John 14:23–24

Paul reminds the believers at Thessalonica to take special note of those who are disobedient. In fact, he tells them to disassociate with them so they will be put to shame!

If anyone does not obey our instruction in this letter, take special note of that person and do not associate with him, so that he will be put to shame.
2 Thessalonians 3:14

After giving very specific instructions on what it means to be a disciple, Jesus issues a very clear warning to those who are ashamed of the Lord and His word:

“For whoever is ashamed of Me and My words, the Son of Man will be ashamed of him when He comes in His glory, and the glory of the Father and of the holy angels.”
Luke 9:26

For those who love the Lord and do not want to be ashamed when they consider His word, John gives this encouragement:

Now, little children, abide in Him, so that when He appears, we may have confidence and not shrink away from Him in shame at His coming.
1 John 2:28