How to get the modules list in Drupal as in admin/build/modules?
Install "Drush" (a good option in any case, once you get used to it, you'll love it). It has a build in command to list all installed modules themes.
If you need to see the list of modules to display it elsewhere (this can be a security issue!), you can look into the way how drush does it (pm.drush.inc:218).
Furthermore there is a core function, but I don't know if this is what you want.