Ok, I solved my problem.
Here is the result:
<?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($galleries)) : ?>
<ul id="slider">
<?php foreach ($galleries as $gallery) : ?>
<li>
<h3><?php echo $gallery->title ?></h3>
<p><?php echo $gallery->galdesc ?></p>
<strong><? $ngg = new NextGEN_Shortcodes;
$id_galeri = $gallery->gid;
echo $ngg->show_gallery( array("id"=>$gallery->gid,"template"=>"projects") ); ?></strong>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>