  We study the generation of single-photon pulses with the tailored temporal
shape via nonlocal spectral filtering. A shaped photon is heralded from a
time-energy entangled photon pair upon spectral filtering and time-resolved
detection of its entangled counterpart. We show that the temporal shape of the
heralded photon is defined by the time-inverted impulse response of the
spectral filter and does not depend on the heralding instant. Thus one can
avoid post-selection of particular heralding instants and achieve substantially
higher heralding rate of shaped photons as compared to the generation of
photons via nonlocal temporal modulation. Furthermore, the method can be used
to generate shaped photons with a coherence time in the ns-$\mu$s range and is
particularly suitable to produce photons with the exponentially rising temporal
shape required for efficient interfacing to a single quantum emitter in free
space.
