it depends in what kind of sentence they are used. Get rid of it is mostly used in anger or when you wane loose something negative. Just get rid of it, they say. For example; get rid of that dog, it is biting my shoes again. Shake it off is mostly used for something you figuratively speak of. So for example; I got a really bad feeling about this. Just do it, shake it off. With other words stop feeling that way.
I hope this helped, good luck :)