Answer
First, you should give your back to the shore and then throw the first rock as fast as you can horizontally (so you will use your max hand force). And according to Newton's third law, the rock will apply the same force magnitude in the opposite direction, so it will push you back to the shore.
Repeat this process and then you will survive.
Work Step by Step
Yes, we can survive by applying Newton's third law in this case.
We need to believe in Newton's third law, so we can use the rocks to move forward to the shore.
First, you should give your back to the shore and then throw the first rock as fast as you can horizontally (so you will use your max hand force). And according to Newton's third law, the rock will apply the same force magnitude in the opposite direction, so it will push you back to the shore.
Repeat this process and then you will survive.
If you are good enough in physics, you will survive, and if not you will die frozen. Physics is your savior here.
See the figures below, and focus on the force diagrams.