When the shale gas reservoir is fractured, stress shadows can cause reorientation of hydraulic fractures and affect the complexity. To reveal the variation of stress shadow with perforation spacing, the numerical model between different perforation spacing was simulated by the extended finite element method (XFEM). The variation of stress shadows was analyzed from the stress of two perforation centers, the fracture path, and the ratio of fracture length to spacing. The simulations showed that the reservoir rock at the two perforation centers is always in a state of compressive stress, and the smaller the perforation spacing, the higher the maximum compressive stress. Moreover, the compressive stress value can directly reflect the size of the stress shadow effect, which changes with the fracture propagation. When the fracture length extends to 2.5 times the perforation spacing, the stress shadow effect is the strongest. In addition, small perforation spacing leads to backward-spreading of hydraulic fractures, and the smaller the perforation spacing, the greater the deflection degree of hydraulic fractures. Additionally, the deflection angle of the fracture decreases with the expansion of the fracture. Furthermore, the perforation spacing has an important influence on the initiation pressure, and the smaller the perforation spacing, the greater the initiation pressure. At the same time, there is also a perforation spacing which minimizes the initiation pressure. However, when the perforation spacing increases to a certain value (the result of this work is about 14 m), the initiation pressure will not change. This study will be useful in guiding the design of programs in simultaneous fracturing.