Personally, I would connect the solar panel to the electrical network and, through an independent battery charger, connected to the electric network, I would charge the batteries. Otherwise you need a grid connection inverter to UPS mode in case of power failure.
I believe, as Waross said, that...