Fixed it without replacing the camera!!!
I have been having the rear camera shaking problem for more than 2 months, as I was not using it. One day I required it desperately and did not work. That is when I sat on it to fix it. After I opened the Iphone 6S plus and removed the camera module. If you notice the lens inside has been detached and shakes from it place. That is the reason of the problem. So what I did was, stuck the lens to the lens body(not the iphone body) with some hot glue. You can also use other glues which will help to keep the camera in place without moving. Ola!!! It is fixed.
P.S. : Please be careful while removing the connectors as you may damage the touch or screen cable.