With the targets of carbon peaking and carbon neutrality, carbon emission reduction measures have become significant issues in new-type power systems. Distribution networks (DNs), which multiple power sources and flexible loads access to, play an essential role in exploiting the potential of reducing carbon emissions on the demand side. To achieve a global carbon emission reduction considering the carbon quota of each customer, shared photovoltaics (PVs) and energy storage systems (ESSs) are allocated with a centralized calculation and optimization conducted by DNs. To solve two key points in demand-side planning of shared PVs and ESSs in distribution networks, i.e., the accuracy of carbon emission flow (CEF) calculation and carbon quota-oriented optimization planning, this paper proposes a low-carbon oriented planning method for shared PVs and ESSs via CEF tracing. Firstly, a novel CEF calculation method is proposed based on the forward current sweep and backward voltage sweep algorithm, which considers the tracing of reactive power and power losses. Next, carbon emission index and economic index of allocating shared PVs and ESSs are defined. Subsequently, a bi-level optimization model is presented, considering the excess carbon emissions of each load based on carbon accounting and carbon quotas. Finally, the superiority of the proposed method is verified through a modified IEEE 33-node distribution network, and the effects of various investment constraints and carbon quotas are discussed.