A self-employed worker has been sentenced for safety failings after carrying out gas work without being Gas Safe registered.