That's "God as machine" or several other things that would be difficult to interpret.
"God to the machine" could be several things, depending on what you mean exactly. If it's like a gift, Deus machinae. If it's more like motion, Deus ad machinam.
"To" is heavily overloaded in English, so...