Section 27. Expenditure of state funds under section twenty-six shall be made only upon the written petition of the selectmen, containing such information as the department may require.