Photodetectors based on two-dimensional (2D) atomically thin semiconductors suffer from low light absorption, limiting their potential for practical applications. In this work, we demonstrate high-performance MoS2 phototransistors by integrating few-layer MoS2 on a PN junction formed on a silicon (Si) substrate. The photovoltage created in the PN junction under light illumination electrically gates the MoS2 channel, creating a strong photoresponse in MoS2. We present a theory to predict the photocurrent of the proposed phototransistor architecture as a function of light intensity, wavelength, and temperature. Our derived formulas for photocurrent and responsivity under varying conditions align well with the measured data. The key advancement of our work lies in the proposed phototransistor architecture, which effectively separates the electric response from the light absorption. This separation enables independent design of the electric response and light absorption, providing opportunities to optimize the functionality and performance of photodetectors. As a demonstration, we use one such device as a single-pixel detector in a single-pixel imaging setup to form a high-resolution image in the near-infrared spectral range.