Create Shortcode

In functions.php
// [shortcodename]
function print_shortcodename_shortcode( $atts ){
    return '<div>Code HTML of the shortcode</div>';
}
add_shortcode( 'shortcodename', 'print_shortcodename_shortcode' );

Do Shortcode

echo do_shortcode( '[shortcode]' );