If it has 802.11g then it has WiFi. Just connect it the network, which it should detect when switched on. Tick the box to confirm that it will always connect to this network.
What makes you think it lacks built in WiFi? What make and model is it?
There should be no problem with XP and Vista. I ran the same setup for a short while before replacing my desktop.