Short codes with custom forms and widgets

how to make custom form  with the use of short code and how to register
widget in Wordpress theme