If the installation script for your application already exists, you can create a component template and call the installation script from the component template.
Example
<?xml version="1.0" encoding="UTF-8"?>
<component xmlns='http://www.sun.com/schema/SPS'
name='DeployMyComponent'
version='5.0'
description='Deploy and configure My Component'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
path='/com/sun/foobar'
author='OEM Platforms'
softwareVendor='Sun Microsystems'
xsi:schemaLocation='http://www.sun.com/schema/SPS component.xsd'>
<extends>
<type name='system#container'></type>
</extends>
<varList>
<var name="bashShell" modifier="FINAL" default="/usr/bin/bash"/>
<var name="installPath" default="/opt"/>
</varList>
<installList>
<installSteps name="deployMyComponent" access="PUBLIC">
<execNative userToRunAs='root' timeout='7200'>
<inputText><![CDATA[
#run installer
/script_directory/installer.sh -p param1 -s param2
#check for errors
RET=$?; if [ $RET != 0 ]; then exit $RET; fi
]]></inputText> <exec cmd=":[bashShell]"></exec>
</execNative>
</installSteps>
</installList>
</component>