There are few ways, how to achieve this, I solve it like this:
1/ in your template create folder helpers
2/ Put in this folder file named hikashop.php and enter this content
<?php
defined('_JEXEC') or die;
class myHikaShop
{
public static function placeBadges(&$image, &$badges, $vertical, $horizontal, $echo = true) {
// your custom code
}
}
3/ Go to HikaShop administration, menu Display - Views and search for show_block_img
4/ Click on show_block_img in column fFile in row with your template.
5/ Search for this code
if(!empty($this->element->badges))
$html .= $this->classbadge->placeBadges($this->image, $this->element->badges, '0', '0',false);
and replace it with this code
if(!empty($this->element->badges)) {
JHtml::addIncludePath( JPATH_BASE.'/templates/'.JFactory::getApplication()->getTemplate(false).'/helpers');
$html .= JHtml::_('my.hikashop.placebadges', $this->image, $this->element->badges, '0', '0',false);
}
6/ save and close - you just made your template override, you can find your modified file in your template in html/com_hikashop/product folder.
7/ do the same for listing_img_title or any other file you need.
Pavel