Firstly, you can rely on iCloud or iTunes to recovery iPhone data, after all, it is free.
- Connect your iPhone with iTune on computer
- Right-click or control-click on the iPhone icon under iDevice on iTunes
- Select "Restore from Backup" from the given options
- After it finishs, your contacts are back to your iPhone
Important Note: This works only if you have made a backup for your contacts on iTunes.
In case that the iCloud or iTunes cannot help to make a iPhone data recovery, you can turn to a third party tool.