We report new theories and simulations for electron acceleration in magnetic islands generated by magnetic reconnection in the shock turbulence in a quasi-parallel shock, using a 2 and 1/2 dimensional particle-in-cell simulation. When an island is moving, unmagnetized electrons are accelerated by the Hall electric field pointing toward the island center. In a stationary island, some electrons are energized by “island betatron acceleration” due to the induction electric field when the island core magnetic field changes with time. In the simulation, almost all of the high-energy electrons in the shock transition region that show a power-law distribution are accelerated in ion-skin-depth-scale magnetic flux ropes, and about half of them are accelerated by the Hall electric field and island betatron acceleration. These mechanisms can produce a power-law electron distribution, and also inject electrons into the diffusive shock acceleration. The mechanisms are applicable to quasi-parallel shocks with high Alfvén Mach numbers (M A > 10), including planetary bow shocks and shocks in astrophysical objects such as supernova remnants.