Thought I'd sussed this then realised the hidden inputs were missing and the button wouldn't add to the cart! I'd be really appreciative if anyone can suggest how to get this to work and keep the code in template.php to avoid messing with module files!

What's happening is that you've based your form function off uc_product_kit, but using it to override the form for uc_product. $node->products doesn't exist for a product node, so the submit function for the form is really confused.

Also, while your approach looks like it would work, I want to suggest that implementing hook_form_alter() would be a better strategy. This lets you worry only about the parts you are changing, and the rest of the form can take care of itself like it always has. To do this, you'll have to make a module to hold your customizations. An example tutorial can be found at http://drupal.org/node/508. All you need is a .info file, and your form_alter function in a .module file.

No it wouldn't because it's not a theme function. It's an implementation of a hook, so it needs to be in a module. To make a module, all you need is an .info file explaining what the module is, and a .module file containing that code snippet. drupal.org has more details in the handbooks.