Downgrading to a previous version of iOS will unenroll the iPhone from the Apple Beta Software Program.
1. Put the iPhone in Recovery Mode. Click here for instructions on how to enter Recovery Mode.
2. Click the Restore button in iTunes and allow the restore process to wipe the device.
3. When complete, use iTunes to restore from the backup you created before installing the public beta. Click here for instructions on how to restore from backup using iTunes.
Once the iOS device has been unenrolled from the Apple Beta Software Program, you can choose to leave the program entirely by following the instructions here.