One problem you may have is turning it on. UPSs are designed to run on mains power and then switch to battery when the power goes out. Some will not turn on without having mains power first. There may be a way to bypass this, such as holding the power button for x amount of seconds to enter test mode. Also, you will likely hear a constant beeping sound telling you that you are running on battery power. You may be able to just disconnect the speaker, but some systems will not function properly if it detects a faulty or missing speaker.
Charging the batteries is easy. Just get a solar charge controller and forget about the built-in charger in the UPS.
A final word of warning. Some big, expensive UPS units are great because they may put out a pure sine wave, but even some of the best built ones are not designed to be running all the time. You may have to deal with using much less power than rated. The unit may be rated for 1000watts but was designed with the expectation that it would only run that large a load for a few hours. Still, your friend may have got lucky. I myself have a few 3000w pure sine wave UPS units that run great for extended periods and I got them completly for free because the batteries were dead. I even sold the batteries for scrap so I actually made money!