A method of moving a device toward a target site in a living body involves introducing an endoscope into the living body, wherein the endoscope has an instrument channel, with the device located at the distal end of the endoscope, and an elongated shaft connected to the device and positioned in the instrument channel. The method includes moving the endoscope and the device within the living body toward the target site, changing the shape of the elongated shaft while moving the device in the living body, and moving the device within the living body while the device is in the second orientation to position the device in the second orientation at the target site.