This paper presents the development and operation on 13.8kV distribution systems of a peak-shaving equipment with battery energy storage. This equipment injects active power to grid during peak times (when the cost of energy is higher) and charges its battery banks from the grid at the off-peak times (when the energy has a low producing cost). The equipment is based on a multilevel converter coupled to the grid through a 2.4kV:13.8kV transformer. In addition to the peak-shaving functionality, a feature of compensation of harmonics on the distribution voltage is included, without the need for any extra sensor nor hardware (apart from the ones already in use for the peak-shaving). The compensation of voltage harmonics is performed through the emulation of a harmonic resistance in order to damp resonances between system impedances that are excited by non-linear loads. This approach is very appealing to distribution systems, where the non-linear loads are not accessible and are scattered. Experimental results obtained on a 13.8kV test substation are presented.