Good post but it misses how to connect and init Magento. This make the magic happen…
// Connect to Magento and init it
[... code from Douglas Radburn ...]
From time to time, you might want to add customers to your Magento store via a script, rather than by hand. This can be especially useful if you’re migrating from an existing solution into a Magento solution.
Setting up a customer with the bare minimum information is easy.