Optical modulation plays arguably the utmost important role in microwave photonic (MWP) systems. Precise synthesis of modulated opti- cal spectra dictates virtually all aspects of MWP system quality including loss, noise figure, linearity, and types of functionalities that can be executed. However, for such a critical function, the versatility to generate and transform analog optical modulation is severely lacking, blocking the pathways to truly unique MWP functions including ultra-linear links and low-loss high rejection filters. Here, we demonstrate a versatile radiofrequency (RF) photonic spectral shaper integrated in a silicon photonic circuit. The spectral shaper controls the two modu- lation bands generated from an electro-optic modulation process in their relative amplitude and phase, offering an enhanced versatility for microwave-photonic modulation applications. Using the spectral shaper, we show electrically tailorable modulation transformations. Fur- thermore, we show a series of unprecedented RF filtering experiments through monolithic integration of the spectral shaper with a network of reconfigurable ring resonators.