Don't fall into the trap of just looking at the installation cost without properly studying your consumption and roof orientation. A lot of people think solar panels are always the solution, but if your roof has shade from trees or buildings for many hours, the payback period gets much longer. The initial investment is really heavy, but with the support that exists (both from the State and some European funds) you can reduce it quite a bit.
As for the payback, in the Lisbon area with a good installation and reasonable consumption, most people manage to recover their money in something like 8 to 12 years, after that it's just profit. There are online simulators that can give you a more concrete idea based on your actual consumption and exact location. Ask an installer to do a feasibility study before you decide.
About battery - you don't necessarily need one. You can connect straight to the grid and that way you save on the battery, which is super expensive. During the day you use the energy you produce, and if you generate more than you consume it goes to the grid (and some distributors credit you for that). It only makes sense to have a battery if you want a lot of autonomy or if your area has frequent power cuts.