There is an online application form on the Ofgem website, along with more information useful when applying. Alternatively, you can ring Ofgem directly, and they will take you through the process.