We demonstrate a multifunctional optical spectral shaper on a silicon photonic chip. The proposed structure is composed of a tunable microring resonator (MRR) and three tunable Sagnac loop mirrors (SLMs), which can be regarded as a large SLM incorporating an MRR-coupled Fabry–Perot (FP) cavity. To realize flexible tuning, thermo-optically tunable Mach-Zehnder interferometer (MZI) couplers are used to replace conventional directional couplers with fixed coupling coefficients. By controlling the tunable MZI couplers, the proposed structure can be reconfigured as various functional structures including an all-pass MRR with tunable coupling regime, a tunable FP cavity, an SLM incorporating FP cavity, and an MRR-coupled FP cavity. This flexible reconfiguration allows for multifunctional optical spectral shaping including tunable comb filtering, Fano and EIT-like resonances. In particular, the complementary flat-top comb filtering responses can be theoretically obtained in the two ports of this device with same free spectral range (FSR) value, which enable the (de)interleaver operation. The experimental results show that the implemented all-pass MRR has a maximum extinction ratio (ER) of 38.9 dB and the corresponding quality factor is 6.5×10 <sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">4</sup> . The comb filter based on configured FP cavity can be switched from narrowband response (0.06 nm) to wideband flat-top response (0.23 nm), with ERs up to 10.6 dB and 22 dB, respectively. Moreover, a dynamic conversion between Lorentz, EIT, and Fano resonance line shapes based on the coupled resonant system can be realized. The demonstrated integrated device holds great potential for various applications such as filtering and switching in optical wavelength-division multiplexing (WDM) communication networks.