how to backup contacts if the touchscreen is not working?
in this link they provide you with some usefull commands to try to get the contacts.
Basically, you need to install the Android SDK, but I think you need to have the USB debugging option on in your phone. Not sure if you need root also.

cd &lt;android-sdk-dir&gt;/platform-tools
[In linux] ./adb pull /data/data/com.android.providers.contacts/databases/contacts2.db
[In Windows] adb.exe pull /data/data/com.android.providers.contacts/databases/contacts2.db


The path to the contacts database might vary from manufacturer to manufacturer.