In this paper, we propose a novel shape-sensing method based on deep learning with a multi-core optical fiber for the accurate shape-sensing of catheters and guidewires. Firstly, we designed a catheter with embedded multi-core fiber containing three sensing outer cores and one temperature compensation middle core. Then, we analyzed the relationship between the central wavelength shift, the curvature of the multi-core Fiber Bragg Grating (FBG), and temperature compensation methods to establish a Particle Swarm Optimization (PSO) BP neural network-based catheter shape sensing method. Finally, experiments were conducted in both constant and variable temperature environments to validate the method. The average and maximum distance errors of the PSO-BP neural network were 0.57 and 1.33 mm, respectively, under constant temperature conditions, and 0.36 and 0.96 mm, respectively, under variable temperature conditions. This well-sensed catheter shape demonstrates the effectiveness of the shape-sensing method proposed in this paper and its potential applications in real surgical catheters and guidewire.