How can I show contents of a template part inside of another page?

Use setup_postdata() to make the ‘current post’ any given post, then retrieve the template part before resetting post data back to the original post. Any template tags that depend on the current post in The Loop that are in the template part will refer to the post you have set up with that function.

function wpse_302305_shortcode( $atts ) {
    global $post;

    $atts = shortcode_atts( ['id' => 0], $atts );

    $post = get_post( $atts['id'] );

    ob_start();

    if ( $post ) {
        setup_postdata( $post );
        get_template_part( 'path/to/template' );
        wp_reset_postdata();
    }

    return ob_get_clean();
}
add_shortcode( 'template', 'wpse_302305_shortcode' );