Do you mean add widgets to a template application and publish it to ArcGIS Online? No. Can you download a template and modify the code and publish it to your own web server? Yes.
var configOptions; function init(){ configOptions = { //The ID for the map from ArcGIS.com webmap : "37069f544ef24c8f9a21fdeade250e94", //Enter a title, if no title is specified, the webmap's title is used. title : "The Dash Map", //Enter a subtitle, if not specified the ArcGIS.com web map's summary is used subtitle : "", //Enter a description, if not specified the ArcGIS.com web map's description is used. description:"", //If the webmap uses Bing Maps data, you will need to provided your Bing Maps Key bingmapskey : "", //specify a proxy url if needed proxyurl:"", //specify the url to a geometry service geometryserviceurl:"http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer", //Modify this to point to your sharing service URL if you are using the portal sharingurl :"http://arcgis.com/sharing/content/items" }; initMap(); createBasemapGallery(); } function createBasemapGallery() { //add the basemap gallery, in this case we'll display maps from ArcGIS.com including bing maps var basemapGallery = new esri.dijit.BasemapGallery({ showArcGISBasemaps: true, bingMapsKey: 'Enter your Bing Maps Key', map: map }, "basemapGallery");