How to get rid of the iOs7 beta?

I downloaded the iOs7 beta version from a youtube video, and it worked, but now my iphone 4S has a lot of bugs and keeps shutting down randomly, and most of the apps don't work. How do i get rid of the iOs7?

You can download the 6.1.3 or 6.1.4 version firmware. Whatever you had before. You can look it up on YouTube.