Class B G-protein-coupled receptors are major targets for the treatment of chronic diseases, such as osteoporosis, diabetes and obesity. Here we report the structure of a full-length class B receptor, the calcitonin receptor, in complex with peptide ligand and heterotrimeric Gαsβγ protein determined by Volta phase-plate single-particle cryo-electron microscopy. The peptide agonist engages the receptor by binding to an extended hydrophobic pocket facilitated by the large outward movement of the extracellular ends of transmembrane helices 6 and 7. This conformation is accompanied by a 60° kink in helix 6 and a large outward movement of the intracellular end of this helix, opening the bundle to accommodate interactions with the α5-helix of Gαs. Also observed is an extended intracellular helix 8 that contributes to both receptor stability and functional G-protein coupling via an interaction with the Gβ subunit. This structure provides a new framework for understanding G-protein-coupled receptor function.