<sec>The shock ignition scheme has the advantages of low ignition energy threshold, high gain, and good hydrodynamic stability, which has become one of the key schemes for the potentially successful ignition of inertial confinement fusion. The crucial element of shock ignition is how to achieve a highly efficient shock laser pulse. We propose a new scheme based on a time-lens system combining the fiber-loop phase modulation and the grating-pair compression to generate a highly controllable shock pulse. Based on the asymmetric phase modulation in time-domain followed by linear dispersion compensation in frequency domain, the shock pulse can be actively controlled with high precision in both pulse duration and pulse contrast (peak power ratio of the compression part to the shock part of the pulse). We construct a theoretical model based on the nonlinear Schrödinger equation to simulate the evolution of the spectrum and temporal shape of the shock laser pulse. The influences of various key parameters of the proposed system on the characteristics of the generated shock pulse are analyzed in depth. </sec><sec>The time lens system consists of three parts, i.e. the seed pulse carving part, the phase modulation loop, and the chirp-compensating grating pair. The operation principle of this system for generating shock pulse is as follows. First, a single-mode continuous wave 1053 nm distributed feedback seed laser is chopped into pulses with a Mach-Zehnder intensity modulator. Then the pulses enter into a fiber-loop for phase modulation. Owing to different modulation frequencies exerted on the left and right side of the pulse, the amount of spectral broadening of these two sides of the spectrum are also different after phase modulation. The spectrally broadened pulses are linearly chirped when the phase-modulation function has a parabolic shape. Finally, the pulse transits through a grating pair system for chirp compensating. Just like an anomalous dispersion delay line, the grating pair applies an anomalous group velocity dispersion to the passing optical pulse. When the chirp is compensated for appropriately, the pulse will be compressed. What the target pulse can be finally shaped into is dependent on the combined optimization of all the above processes.</sec><sec>The simulation results show that by systematically designing the parameters such as chopping function, phase modulation function, modulation depth, modulation frequency, and chirp compensating, the target shock pulse can be actively controlled with high-precision in the pulse width, pulse rising edge, and peak-power contrast. In addition, we can also tune only one parameter (such as the pulse width) of the pulse, with the other parameters kept unchanged. This new design idea and the proposed system can actively and independently adjust the two key parameters (the peak power contrast and the pulse width) of the generated shock pulse, which is not only helpful in deepening our understanding of the principle of laser-pulse shaping, but also significant for the subsequent practical implement of shock ignition of inertial confinement fusion.</sec>