The absence of shape information can result in inaccurate localization and control of slender, flexible surgical instruments in narrow and tortuous lumen environments. In order to deal with the problem of shape sensing, this paper presents a prototype optical fiber shape sensor based on a triangular configuration, with each fiber containing 10 Fiber Bragg Grating (FBG) sensors. Given that the optical fiber is glued to the substrate, a four-layer strain transfer model is developed to analyze the adhesive’s effect on adhesion performance and to correct the curvature sensitivity coefficient matrix. This paper uses ANSYS software to generate 8 curves of varying complexity and analyze how the number of curvature sampling points affects the performance of three shape reconstruction algorithms. Finally, perception experiments on eight sets of predefined 3D spatial templates are carried out to verify the theoretical model. The experimental results indicate that the average end position error, average Frechet distance error, and average RMSE of the three algorithms were less than 1.1%, 1.6%, and 0.6% of the total sensor length, respectively. Therefore, the algorithms proposed in this paper effectively sense the sensor’s shape.