Accessing my contacts from broken iPhone?
Check your iCloud account to see if your contacts were backed up. You can go to www.icloud.com and then sign in with your Apple ID and password. Once you are in, you'll be able to view contacts and see if they are backed up.

As for the iPhone and its battery/power issues, you'll need to visit an Apple Store and get a new battery to replace the current one. Keep in mind you may have to pay for it since its likely that you no longer have a warranty on it. That should at least fix the issue. Also since support is no longer provided for the iPhone 4, they can choose to opt out of repairing it if they can't order the parts from the repair depot.

***Make sure that when you charge your iPhone that you use the standard Apple charger that came with your iPhone. By using third-party chargers, they can create issues similiar to this one.