A little context might help us here. Exodus 20 is the famous chapter in which God gives the 10 Words, the 10 Commandments, to Moses and the people of Israel. He speaks these 10 Words in the hearing of all the people because at this point in the narrative Moses is at the bottom of Mt. Sinai speaking with the people as well. But to the people the voice of YHWH was like peals of thunder, flashes of lightning, shakings of the earth, and loud trumpet blasts. And quite naturally they feared for their lives! They say to Moses in v.19 - "You speak to us and we'll listen; but don't let God speak to us or else we'll die!" So when we arrive at v.20 this is Moses' attempt to comfort the people in their terror.
Moses' injunction, "Take Courage!" is followed by a string of purpose clauses which serve as the ground or reason why the people can obey Moses' command.
1) "God has come to you in order to test you" - This awesome display of power before your eyes it a test for you, Israel, to see where your trust lies. The Septuagint translator is so set on communicating this point that he uses both a purpose conjunction and a purpose infinitive to make the point. But this purpose is not God's ultimate aim in this encounter.
2) "in order that the fear of God might be in you" - This reverent fear Yahweh is aiming at must be "in you". It is an external test with inward aims. God will not settle for externally submissive worship if their hearts are "far off". Pharaoh showed this kind of reverence at times when he acknowledged the greatness of Yahweh but the fear of Yahweh was not in him. God came to test Israel to produce inward fear, but this purpose is still not ultimate.
3) "in order that you might not sin." - Here we land on God's ultimate purpose in this fiery ordeal, holiness! Sin is a powerful adversary and it has a death grip on all of humanity. Only something more powerful can combat this evil foe, only something that penetrates our hearts deeper, only something that fills us to overflowing. The people of Yahweh needed a reverent fear of Yahweh produced by a magnificent vision of Yahweh if they were to follow the ways of Yahweh, His 10 Words. This is the ultimate end of this verse, a fearful vision producing holiness.
Did this happen? Sadly, no; v.21 tells us the people stood "far off" and the fear was not courageously in them. Not many chapters later the people of God learned how to completely ignore the thunders and thick darkness while they worshipped images made in the likeness of creation. But it need not be so with us! Everytime we sit before the sacred and terrible Word of God, take courage! God is there to reveal Himself in all His glorious majesty so that we fear ("believe") and live holy lives. What mercy it is to know Jesus Christ! In Him we can take courage and in Him have eyes to see this fearful vision leading to hoilness!