Does the oxygen sensor need to be hooked up for a smog pump to work?

No,but for fuel efficiency it is best. All the emission devices have a purpose and all work together for the good of the engine.