The code snippet that you have tried is a Magento widget. From your question its clear that, this widget is providing by an external extension. A magento widget is just like any other widget that are using in other frameworks. It does a specific task with a short code, so that non-technical users can also use that code. However you cannot use that widget code everywhere in the case of Magento. For example, you can use widget in CMS Pages, but not in a template file. If you put this code inside template, Magento treats it like normal text.
So in order to get output, instead of using widget, you need to include corresponding block in appropriate place. Here you are trying to add this block in product detail page. That means, you need to add the block correspond to the widget in
catalog_product_view handler in layout file.
For example, you can use this code
<block type="bannerslider/default" name="product.slider" as="product_slider" template="bannerslider/bannerslider.phtml">
Now you need to call this block in product detail template. ie
<div><?php echo $this->getChildHtml('product_slider'); ?></div>
You can put this code snippet wherever it needs to show inside
Note: My friend @AmitBera gave you a short form of what we have done here. You can also use that code in