This study focuses on the application of the circular economy approach, with generation of energy and production of added-value products from organic waste, while minimizing environmental impacts. Within this purpose, an urban biorefinery technology chain has been designed at pilot scale for the production of biogas and biopolymers (polyhydroxyalkanoates, PHA). The pilot system (100-400 L) comprised different units: a) biowaste acidogenic fermentation; b) solid/liquid separation unit (a coaxial centrifuge and a tubular ultrafiltration membrane); c) a Sequencing Batch Reactor (SBR) for the production of aerobic PHA-storing biomass; d) aerobic fed-batch PHA accumulation reactor and e) anaerobic co-digestion (ACoD). The thermal pre-treatment of the biowaste before mesophilic fermentation increased the carbon conversion into volatile fatty acids (VFA), being the final VFA/CODSOL (soluble COD) higher than 0.80. The VFA-rich stream was utilized in a high-rate SBR for the enrichment of PHA-accumulating biomass, at short solid retention time (SRT of 1 d), 12 h of cycle length and 4.0 gCOD/L d as organic loading rate (OLR). The aerobic biomass was characterized by a high accumulating capacity (with PHA content around 60% on cell dry weight). The global PHA yield of 0.1 kg PHA/kg VS (volatile solids) was estimated as the best scenario. The excess sludge and the solid-rich biorefinery overflows were utilized for biogas production in a dedicated anaerobic digestion section to sustain a closed loop approach and to prevent secondary wastes production.