My Canon SX160 shut down when battery power was out and a lens error was displayed. Now, the lens is stuck open.
My personal solution in such case (based on the experience with Canon SX120) is:
- put in the camera fresh/charged batteries
- power on the camera
- press the lens barrel
- power off the camera
- press again the barrel
N.B. When pressing do not use much force because you can broke the mechanics and electronics.
If the above solution do not work for you better send your camera to the service bureau.