Shares held by a broker to can be transferred to Direct Registration electronically by contacting a stockbroker and instructing the broker to transfer all or some of your shares through the Direct Registration System.
Yes, you can write your own contract. However, including all necessary elements is crucial to make it legally binding.