If you knew a bit more about DC motors and generators, you would see that Don is absolutely correct. Mechanically, and electrically, a shunt-wound DC motor *IS* a shunt-wound DC generator. There is no difference at all, except one you hook up to a DC power supply to turn a load, and the other you hook up to a spinning shaft to generate electricity.
Old-style UPS systems used an AC induction motor to drive a synchronous AC generator and a DC generator to charge batteries. Upon a loss of AC power to the induction motor, the current in the DC machine would simply reverse direction and draw power from the battery. The DC generator would instantly become a DC motor, spinning in the same direction, just drawing power from the battery instead of supplying power to the battery. The AC synchronous generator output is used to supply the load at all times. It can't even tell whether the shaft is being driven by the AC induction motor or the DC machine acting as a motor.
If built with a substantial flywheel, these units can supply uninterruptable power where voltage sine wave is hardly perturbed at all during the loss of power to the AC induction motor.
Maybe you should learn there are more kinds of electrical machinery than the blender you use to mix your drinks with. Although not very 'main stream', DC machinery is quite flexible as a motor/generator.
daestrom