drupal_render() returns "Array" instead to render the content I'm using Drupal 7 and I have made a custom module in which there is this function.

    function product_search_by_pin_form($form, &amp;$form_state) {
           // Provide a text field.
           $form['pin'] = array(
           '#method'=&gt; 'POST',
           '#action' =&gt; '$come_back',
           '#title' =&gt; t('Input your PIN'),
           '#type' =&gt; 'textfield',
           '#attributes' =&gt; array('size' =&gt; '20', 'maxlength' =&gt; '20'),
           '#placeholder' =&gt; 'Type your PIN',
           '#required' =&gt; TRUE,);

           // Provide a submit button.
           $form['submit'] = array(
           '#type' =&gt; 'image_button',
           '#required' =&gt; TRUE,
           '#src' =&gt; "/images/upload/search.png",
           '#attributes' =&gt; array('id' =&gt; 'submit'),
           '#value' =&gt; 'Search',);

           return $form;
    } // END of Function


The form is being used from the following code.

    $arr = drupal_get_form('product_search_by_pin_form');
    print drupal_render($arr);


The problem is that Drupal displays the Array instead of showing the form.

How can I solve it?

EDIT
As asked, and after have followed suggestions but without result, please here the code of the module

&lt;?php
/**
 * @file
 * a test file
 */

/**
 * Implements hook_menu().
 */


function myform_menu() {
  $items = array();

  $items['/examples/myform-examples'] = array(
    'title' =&gt; 'Example myform',
    'description' =&gt; 'Configuration for TEST module',
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('product_search_by_pin_form'),
    'access callback' =&gt; TRUE
  );

  return $items;
}


/**
 * Implements hook_help().
 *
 * Displays help and module information.
 *
 * @param path 
 *   Which path of the site we're using to display help
 * @param arg 
 *   Array that holds the current path as returned from arg() function
 */

function myform_help($path, $arg) {
  switch ($path) {
    case "admin/help#myform":
      return '' . t("&lt;b&gt;Myform&lt;/b&gt; to test a drupal form") . '';
      break;
  }
}


function product_search_by_pin_form($form, &amp;$form_state) {
       // Provide a text field.
       $form['pin'] = array(
       '#method'=&gt; 'POST',
       '#action' =&gt; '$come_back',
       '#title' =&gt; t('Input your PIN'),
       '#type' =&gt; 'textfield',
       '#attributes' =&gt; array('size' =&gt; '20', 'maxlength' =&gt; '20'),
       '#placeholder' =&gt; 'Type your PIN',
       '#required' =&gt; TRUE,);

       // Provide a submit button.
       $form['submit'] = array(
       '#type' =&gt; 'image_button',
       '#required' =&gt; TRUE,
       '#src' =&gt; "/images/upload/search.png",
       '#attributes' =&gt; array('id' =&gt; 'submit'),
       '#value' =&gt; 'Search',);

       return drupal_get_form($form);
} // END of Function
First try Render instead of drupal_render

$arr = drupal_get_form('product_search_by_pin_form');
print render($arr);


From Clive answer on what is the difference between render() and drupal_render()?


  The docs for render() explain it pretty well:
  
  This function renders an element using drupal_render(). The top level
  element is shown with show() before rendering, so it will always be
  rendered even if hide() had been previously used on it. render() is
  basically just a wrapper for drupal_render(), except that it makes
  sure the element passed in is set to be shown when passed through to
  drupal_render().
  
  It also makes sure the element passed in is an array (which is all
  drupal_render() can accept). If it isn't, the element is return back
  as-is. So it provides a bit of a safety net if you like.
  
  If for any reason you have a variable you need to render, and you
  don't know if it's a string or a render array, you can pass it
  straight through render() without having to test the variable type
  yourself.


and another solution is, use drupal_get_form as you call back function and pass your form to it as an argument. ( take a look at https://www.drupal.org/docs/7/howtos/how-to-make-a-simple-module-with-a-form-and-menu-link )

function YOURMODULE-NAME_menu() {
  $items = array();

  $items['examples/form-example'] = array( //this creates a URL that will call this form at "examples/form-example"
    'title' =&gt; 'Example Form', //page title
    'description' =&gt; 'A form to mess around with.',
    'page callback' =&gt; 'drupal_get_form', //this is the function that will be called when the page is accessed.  for a form, use drupal_get_form
    'page arguments' =&gt; array('product_search_by_pin_form'), //put the name of the form here
    'access callback' =&gt; TRUE
  );

  return $items;
}

function product_search_by_pin_form($form, &amp;$form_state) {
         // Provide a text field.
       $form['pin'] = array(
       '#method'=&gt; 'POST',
       '#action' =&gt; '$come_back',
       '#title' =&gt; t('Input your PIN'),
       '#type' =&gt; 'textfield',
       '#attributes' =&gt; array('size' =&gt; '20', 'maxlength' =&gt; '20'),
       '#placeholder' =&gt; 'Type your PIN',
       '#required' =&gt; TRUE,);

       // Provide a submit button.
       $form['submit'] = array(
       '#type' =&gt; 'image_button',
       '#required' =&gt; TRUE,
       '#src' =&gt; "/images/upload/search.png",
       '#attributes' =&gt; array('id' =&gt; 'submit'),
       '#value' =&gt; 'Search',);

  return $form;
}


and third is another way of implementation second solution

function product_search_by_pin_form($form, &amp;$form_state) {
       // Provide a text field.
       $form['pin'] = array(
       '#method'=&gt; 'POST',
       '#action' =&gt; '$come_back',
       '#title' =&gt; t('Input your PIN'),
       '#type' =&gt; 'textfield',
       '#attributes' =&gt; array('size' =&gt; '20', 'maxlength' =&gt; '20'),
       '#placeholder' =&gt; 'Type your PIN',
       '#required' =&gt; TRUE,);

       // Provide a submit button.
       $form['submit'] = array(
       '#type' =&gt; 'image_button',
       '#required' =&gt; TRUE,
       '#src' =&gt; "/images/upload/search.png",
       '#attributes' =&gt; array('id' =&gt; 'submit'),
       '#value' =&gt; 'Search',);

       return drupal_get_form($form);
} // END of Function