A fundamental question in monopolistic competition theory is whether the market allocates resources efficiently. This paper generalizes the Spence-Dixit-Stiglitz framework to heterogeneous firms, addressing when the market provides optimal quantities, variety and productivity. Under constant elasticity of demand, each firm prices above its average cost, yet we show market allocations are efficient. When demand elasticities vary, market allocations are not efficient and reflect the distortions of imperfect competition. After determining the nature of market distortions, we investigate how integration may serve as a remedy to imperfect competition. Both market distortions and the impact of integration depend on two demand side elasticities, and we suggest richer demand structures to pin down these elasticities. We also show that integration eliminates distortions, provided the post-integration market is sufficiently large.