  We perform a numerical-simulation study of the acceleration of electrons at
shocks that propagate through a prespecified, kinematically defined turbulent
magnetic field. The turbulence consists of broadband magnetic fluctuations that
are embedded in the plasma and cover a range of wavelengths, the smallest of
which is larger than the gyroadii of electrons that are initially injected into
the system. We find that when the variance of the turbulent component of the
upstream magnetic field is sufficiently large -- $\sigma^2 \sim$ 10 $B_0^2$,
where $B_0$ is the strength of the background magnetic field -- electrons can
be efficiently accelerated at a collisionless shock regardless of the
orientation of the mean upstream magnetic field relative to the shock-normal
direction. Since the local angle between the incident magnetic-field vector and
the shock-normal vector can be quite large, electrons can be accelerated
through shock-drift acceleration at the shock front. In the upstream region,
electrons are mirrored back to the shock front leading to multiple shock
encounters. Eventually the accelerated electrons are energetic enough that
their gyroradii are of the same order as the wavelength of waves that are
included in our description of the turbulent magnetic field. Our results are
consistent with recent \textit{in situ} observations at Saturn's bow shock. The
study may help understand the acceleration of electrons at shocks in space and
astrophysical systems.
