He gave electric shocks to people in an MRI machine, and then gave them the option of either getting an intense shock immediately or a less intense shock later.
The machine let the E. coli multiply, mixed them with the DNA strands, and applied an electric shock to open up the bacterial cells and let the DNA get inside.