I've been having this same issue on an iPhone 5 on iOS 8.4.1 and couldn't find a good definite solution anywhere online that doesn't involve restoring, since this thread is the first thing that comes up in google I decided to make an account to help anyone who is experiencing the same problem as I was.
Go to Settings > General > Accessibility > Reduce Motion > and turn it On. It will get rid of the parallax effect (which is what seems to be causing the problem) but it will also change how your phone moves from and to applications with a fading effect instead. Since I was used to to old effects I decided to turn it off again after a few hours and got the shaking glitch was gone! I'm not sure if it'll fix it immediately if you turn it back off. So if the above solution doesn't work immediately leave it for On for a few hours and switch it back off to have your phone the way it was before.