Buy a Membership (User Group) as a Product

I searched in the forum but couldn't find any related thread.

I would like to sell a membership that offers free shipping for a year.

This should be presented as a regular product with an Add To Cart button, but as soon as the customer purchases it I would like to have him in a usergroup that enables him free shipping for his next orders…

Any ideas?