Passage
Then shall I not be confounded, when I shall look into all thy commandments.
Then shall I not be confounded, when I shall look into all thy commandments.
Psalms 118:4 Thou hast commanded thy commandments to be kept most diligently.
Psalms 118:5 O! that my ways may be directed to keep thy justifications.
Psalms 118:6 Then shall I not be confounded, when I shall look into all thy commandments.
Psalms 118:7 I will praise thee with uprightness of heart, when I shall have learned the judgments of thy justice.
Psalms 118:8 I will keep thy justifications: O! do not thou utterly forsake me.
The verse centers on "shall", "confounded", "look", and "commandments". It is saying that the verse draws attention to "shall" and "confounded", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 5's "O that my ways may be directed..." into verse 7's "I will praise thee with uprightness of...", so "shall" and "confounded" belong inside that flow. In Psalms context, the local focus is worship, trust, the LORD's kingship, and covenant mercy.
A plain takeaway is to answer the verse's own emphasis on "shall" and "confounded" with trust shaped by these words, not by a vague optimism outside the passage.