On the admin side, which I assume is where you want to run this, the get_plugins
function will retrieve an array of plugins along with data about each.
function dump_plugins() {
var_dump(get_plugins());
}
add_action('admin_init','dump_plugins');
Obviously, that code is illustrative only. It will make a big mess of your site.