In this study, we developed a shape-sensing technique for a pipe. An optical fiber was helically bonded on the outer surface of a resin pipe whose length, outer diameter and inner diameter are 3200 mm, 34 mm, and 26.6 mm, respectively. Firstly, four grooves were made on the surface along the pipe in a helical pattern with the same pitch of 360 mm. At the one pipe end, adjacent grooves were offset by 90 degrees and the offset was maintained along the pipe. The single-mode fiber was put into a groove and fixed by epoxy and then it was embedded into the adjacent groove. Consequently, the optical fiber was going back and forth twice along the pipe. At the pipe ends, there were stress-free fibers between the grooves. Shape sensing for the pipe is conducted as follows. 1. Strain distributions along the grooves are measured by a distributed fiber-optic strain sensing system. 2. The bending strain is extracted from the measured strain to calculate the curvature and bending angle. 3. The shape of the pipe is reconstructed based on the curvature and bending angle using the Frenet-Serret formulas. Three-point bending tests were conducted. In the tests, the pipe ends were clamped to be the fixed ends and a point load was applied to the pipe center. Strain distributions were measured by tunable wavelength coherent optical time domain reflectometry (TW-COTDR) or optical frequency domain reflectometry (OFDR). Then the pipe shape was reconstructed as described above. We compared the reconstructed shape with the deformation calculated by finite element analysis and the agreement was excellent. If we insert the developed pipe into a bedrock and reconstruct the pipe shape continuously, it is expected that we can detect cracks or damage in the bedrock. This approach is expected to make rock excavation constructions safer.