how to write html/php code that shortcode mp_product_list invoke

I'm using with MarketPress in the theme GridMarket

I wanna customize html that shortcode mp_product_list invoke and edited template-function.php in /plugins/marketpress/marketpress-includes

function _mp_products_html_grid($post_array = array()) {
    global $mp;
    $html = '';

    //get image width
    if ($mp->get_setting('list_img_size') == 'custom') {
        $width = $mp->get_setting('list_img_width');
    } else {
        $size = $mp->get_setting('list_img_size');
        $width = get_option($size . "_size_w");
    }

    $inline_style = !( $mp->get_setting('store_theme') == 'none' || current_theme_supports('mp_style') );

    foreach ($post_array as $post) {

        $img = mp_product_image(false, 'list', $post->ID);
        $excerpt = $mp->get_setting('show_excerpt') ?
                '<p class="mp_excerpt">' . $mp->product_excerpt($post->post_excerpt, $post->post_content, $post->ID, '') . '</p>' :
                '';
        $mp_product_list_content = apply_filters('mp_product_list_content', $excerpt, $post->ID);

        $class = array();
        $class[] = strlen($img) > 0 ? 'mp_thumbnail' : '';
        $class[] = strlen($excerpt) > 0 ? 'mp_excerpt' : '';
        $class[] = mp_has_variations($post->ID) ? 'mp_price_variations' : '';

        $html .= '<div class="mp_one_tile ' . implode($class, ' ') . '">
                <div class="mp_one_product"' . ($inline_style ? ' style="width: ' . $width . 'px;"' : '') . '>

                  <div class="mp_product_detail"' . ($inline_style ? ' style="width: ' . $width . 'px;"' : '') . '>
                    ' . $img . '

                    <h3 class="mp_product_name">
                      <a href="' . get_permalink($post->ID) . '">' . $post->post_title . '</a>
                    </h3>

                    ' . $mp_product_list_content . '
                  </div>

                  <div class="mp_price_buy"' . ($inline_style ? ' style="width: ' . $width . 'px; margin-left:-' . $width . 'px;"' : '') . '>
                    ' . mp_product_price(false, $post->ID) . '
                    ' . mp_buy_button(false, 'list', $post->ID) . '
                    ' . apply_filters('mp_product_list_meta', '', $post->ID) . '
                  </div>

                </div>
              </div>';
    }

    $html .= (count($post_array) > 0 ? '<div class="clear"></div>' : '');

    return $html;
}

to

function get_products_html_grid($post_array=array()){
  global $mp;
  $html='';

  //get image width
  if ($mp->get_setting('list_img_size') == 'custom'){
    $width = $mp->get_setting('list_img_width');
  } else {
    $size = $mp->get_setting('list_img_size');
    $width = get_option($size."_size_w");
  }

  $inline_style = !( $mp->get_setting('store_theme') == 'none' || current_theme_supports('mp_style') );

  foreach ($post_array as $post) {

    $img = mp_product_image(false, 'list', $post->ID);
    $excerpt = $mp->get_setting('show_excerpt') ?
                      '' :
                      '';
    $mp_product_list_content = apply_filters( 'mp_product_list_content', $excerpt, $post->ID );

    $class=array();
    $class[] = strlen($img)>0?'mp_thumbnail':'';
    $class[] = strlen($excerpt)>0?'mp_excerpt':'';
    $class[] = mp_has_variations($post->ID) ? 'mp_price_variations':'';

    $html .= '<li class=" '.implode($class, ' ').'">

                    '.$img.'

					<div class="caption">
					<div class="inner">
                    <h3 class="mp_product_name title">
                      ' . $post->post_title . '
                    </h3>

                    '.$mp_product_list_content.'
					'.display_rating_result().'
                  <p class="price">
                    '.mp_product_price(false, $post->ID).'
                    '.apply_filters( 'mp_product_list_meta', '', $post->ID ).'
                  </p>

				</div></div>
              </li>';

  }

  $html .= (count($post_array)>0?'<div class="clear"></div>':'');

  return $html;
}

I could display what I wanted to do by editing like this but I cannot update plugin now.
so I want to know how to write that codes not in that template-function.php, like in index.php where I want to display the lists.