It may be too late to share your contacts. If the forced restart described above does not work you can try the following to at least attempt to get your phone working again.
Recovery Mode:
Turn off your device if possible, if not ignore.
Connect the device charging cable to the computer only (not to the iPhone or iPad yet).
Open iTunes.
Press and hold the power button on your device and don’t let go.
Connect the cable to the device while keeping the power button pressed down.
Wait until the computer detects the device and wait for it to restore.
Restore as New first and then restore from backup(s) if desired.
https://support.apple.com/en-us/HT204686