Residential end-users have increasingly been attracted to installing behind-the-meter (BTM) photovoltaic (PV) and battery energy storage systems (BESS). The inherent stochastic nature of PV introduces challenges to energy management for PV-BESS owners. This work presents a two-stage stochastic optimization (SO) framework for battery operation that takes into account uncertainties in PV outputs to minimize daily grid consumption and battery degradation. A combination of a feed-forward neural network (FFNN) and an error analysis statistical technique is proposed to generate a highly accurate scenario set for estimating PV behavior. Then, the scenario set is reduced using a backward scenario reduction technique to address the issue of dimensionality that SO suffers from. The reduced scenario set is then fed into the two-stage SO model to calculate expected electricity costs and battery degradation for the day-ahead PV-BESS problem. The suggested model's performance in controlling BTM batteries is evaluated using real-world data collected from smart meters installed in a house in Aran Islands, Ireland. The results show that the model can effectively withstand sudden changes in the PV output and generate results that are comparable to an ideal case with accurate PV data available.