Multiple loops for plugin

I’ve managed to do it by setting the post type when I make the query

$my_query = new WP_Query( array("post_type" => "tcp_product"));
if ( $my_query->have_posts() ) { 
    while ( $my_query->have_posts() ) { 
        $my_query->the_post();
        the_title();
    }
}
wp_reset_postdata();