Hyper-redundant robots have good prospects for applications in confined space due to their high flexibility and slim body size. However, the super-redundant structure brings great challenges for its inverse kinematics with shape constraints. Unfortunately, traditional Jacobian pseudo-inverse-based inverse kinematics method and forward and backward reaching inverse kinematics (FABRIK) method are difficult to constrain the arm shape and realize trajectory tracking in confined spaces. To solve this problem, we propose a shape-controllable FABRIK method to satisfy the given path and shape constraints. Firstly, the kinematic model of the hyper-redundant robot is established, and the canonical FABRIK method is introduced. Based on the preliminary works, the single-layer improved FABRIK method is developed to solve the position and pointing inverse kinematics considering path environment and joint angle constraints instead of two-layer geometric iterations. For tracking the desired end roll angles, the polygonal virtual arm is designed. The real arm roll angle is achieved by controlling its winding on the virtual arm. In this way, the shape can be controlled. Finally, we compare the proposed method with other three approaches by simulations. Results show that the proposed method is more efficient and the arm shape is controllable.