Is it possible to grant a second developer the right to create shelve sets without allowing him to check-in or commit the changes directly to the code base?
If yes, how to do it?
You can deny that user or group the Check-in permission, see Team Foundation Version Control (TFVC) permissions, but it is better to remove the permission.